A More Simplified Approach to Socket Programming

Moving up to the next layer of functionality offered by the .NET classes, we arrive at the TCPClient, UDPClient, and TCPListener classes. These classes offer a more simplified approach to socket programming, while retaining quite a bit of power. The two client classes are very similar with some fundamental differences between them that are worth pointing out:

  • The TCPClient class deals with TCP connections; thus, it is stream oriented.

  • The UDPClient class deals with UDP connections and is datagram oriented.

  • Send and receive operations with the TCPClient class are done through Stream class instances.

  • Send and receive operations with the UDPClient class can be accomplished by calling the Send and Receive ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.