Working with Sockets

Sockets are the de facto standard for communicating with other computers on both local area networks (LANs) and wide-area networks (WANs), such as the Internet. Two computers communicate to each other by using sockets that follow a general protocol where one computer is expecting to receive a connection, and the other makes the initial connection.

  • The computer expecting to receive a connection, the host or server, listens for incoming connections on a specific port. The computer has a unique IP address, such as, and thousands of port numbers available, making it possible for many programs to listen for connections, each using a different port.

  • The computer that makes the initial connection, the client, determines ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.