Summary

This chapter showed how to uses library classes for sockets and HTTP operations. Sockets are easily managed with the TcpClient and TcpListener classes. The examples used these classes to implement both a socket server and a corresponding socket client.

I also showed how to use the HTTP classes to read a Web page. Some of the same classes were used for both the HTTP and socket examples. These included encoders and streams that worked with byte arrays.

As the examples in this chapter showed, many networking programs work extensively with strings extensively. The next chapter, “String Manipulation,” provides detailed explanations on how to work with strings.

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.