- In order to better understand, if we view rooms as applications, we can regard a
socket as a door of a room, which is used to communicate with other rooms.
- A socket is an abstract representation of a communication endpoint.
- A socket is uniquely identified by the IP address, Port number and the underlying transport layerprotocol. Port number is the door number, IP address is the bulding address.
- Type: Stream socket(TCP), Datagram socket(UDP), and others
2. TCP Socket
3. UPD Socket