Sockets for clients
Sockets are a way with which applications communicate with the OS, which in turn communicates with the network.
A socket performs seven basic operations:
- 1.Connects to a remote host
- 2.Sends data
- 3.Receives data
- 4.Closes a connection
- 5.Binds to a port
- 6.Listens for incoming data
- 7.Accepts connections from remote machines on the bound port
There are two main types of application level sockets:
- TCP - Transmission Control Protocol,
- UDP - User Datagram Protocol.