Using sockets
Socket and file descriptors are allocated from the same set of integers => I/O the same operations such as read and write can be used with both
Creating a socket: result = socket(pf, type, protocol);(the socketpair system call is not meaningful with TCP/IP)
Terminating a socket: close(socket);
Specifying a local address: bind(socket, localaddr, addrlen);
Connecting to address: connect(socket, destaddr, addrlen);
Sending data: write(socket, buffer, length); writev(socket, iovector, vectorlen); send(socket, message, length, flags); sendto(socket, message, length, flags, destaddr, addrlen); sendmsg(socket, messagestruct, flags);