Loading...
Select Version
&pagelevel(4)&pagelevel
The following call creates a stream socket in the Internet domain AF_INET:
s = socket(AF_INET, SOCK_STREAM, 0);
In this case, the underlying communications support is provided by the TCP protocol.
The following call creates a datagram socket in the Internet domain:
s = socket(AF_INET, SOCK_DGRAM, 0);
The UDP protocol used in this case transfers the datagrams without any further communications support to the underlying network services.