Socket Programming with the .NET Compact Framework

The central class for socket programming with the .NET Compact Framework is the System.Net.Sockets.Socket class. The procedure for getting a Socket class connected to a remote computer depends on whether the socket connects as the host or as the client. Once the Socket is connected to a remote computer, however, the processes for reading and writing are exactly the same.

Making a Connection as a Client

To successfully make a connection as a client, we must first understand the System.Net.EndPoint class. The EndPoint holds the information about where to connect to the IPv4 address of the host and the desired port. To set up a valid EndPoint and use it to connect a socket to a host, follow these ...

Get Microsoft® .NET Compact Framework Kick Start 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.