What is a socket?A socket is used to connect an application to a network protocol. A socket enables communication between a client and a server. The communication is started when the client is assigned a local port number, and binds a socket to it. The client writes on the socket and gets information from server by reading it.What are Sockets? How do Sockets Work?A socket is used to connect an application to a network protocol. A socket enables communication between a client and a server. The communication is started when the client is assigned a local port number, and binds a socket to it. The client writes on the socket and gets information from server by reading it. The Socket class is used to communicate. It provides rich set of methods for both asynchronous and synchronous data transfer. ConnectAsynch is used to start an asynchronous connection. SendAsynch and ReceiveAsynch are used to send and receive data. Shutdown and close methods are used to shutdown and close the sockets.
|