Copyright © 2001 Qusay H. Mahmoud
27
Sockets
lAnalogous to telephones – provide the user with an interface to the network
lThink of a socket as an end point of a Unix pipe
lUsed in the same way as a file descriptor:
–Creation (open socket)
–Read/write (receive/send to socket)
–Destruct (close socket)
lTypes: SOCK_STREAM, SOCK_DGRAM, SOCK_RAW