Sockets are interior endpoint built for sending and receiving data. It is a combination of an IP address and a port.
A single network has two sockets one for each communicating device or a program.
Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC).
A single device can have ‘n’ number of sockets based on the port number that is being used.
Lets us see some common port numbers and a protocol.
- HTTP – 80
- FTP – 20
- NNTP – 119
- SMTP – 25
- Telnet – 23
This is all about socket.