CITS3002 Computer Networks |
← prev | next → | CITS3002 | help3002 | CITS3002 schedule | |||
Establishing Sockets With OS System CallsThe socket mechanism requires several Unix system calls. The socket() call establishes an end point of a communications link.
protocol is usually 0 to indicate the default for the family/type combination. The socket() system call returns a small integer, termed a socket descriptor, (akin to a file descriptor). The call may fail due to a request for an unknown protocol or when a request is made for a type without a supporting protocol.
The socket() system call only instantiates protocol from the 5-tuple association.
Depending on whether the socket is being used in the client or server of
either a connection-oriented or connectionless communication,
different programs do different things next:
CITS3002 Computer Networks, Lecture 8, Transport layer protocols and APIs, p11, 24th April 2024.
|