Socket basically is a OS handle, but what does it represents?
First of all socket has properties like:
Protocol.
Family. (internet, ATM)
Is it raw sockets.
In our library we deal with IP, TCP, UDP, and ICMP sockets which can be regular or raw.
For each protocol a socket behaves differently:
|
IP |
Can be used only for raw sockets, sending raw headers, not used for regular communication. |
|
TCP |
Has three parts:
For more information on TCP sockets see TCP sockets. |
|
UDP |
Since UDP is stateless it can both receive and send. For more information see stateless sockets. |
|
ICMP |
Since ICMP is stateless it can both receive and send. For more information see stateless sockets. |