A socket is an endpoint between two ways of communication.
Connection-oriented & Connectionless protocol
In the connection-oriented protocol, the acknowledgment sent by the receiver so it will be reliable but a bit slow. e.g., TCP
Connectionless protocol, the acknowledge will never set by the receiver. It isn’t reliable but fast. e.g., UDP.