{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Kill plus locking primives non blocking io fcntl

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: dress transla)on –  Can specify port as a service name or number –  May return mul)ple addresses –  You must free the structure with freeaddrinfo •  Other useful func)ons to know about –  getnameinfo – Lookup hostname based on address –  inet_ntop – Convert IPv4 or 6 address to printable –  Inet_pton – Convert string to IPv4 or 6 address EOF in more detail •  What happens at end of store? –  Server receives EOF, renames file, responds OK –  Client reads OK, a6er sending EOF: didn’t close fd •  int shutdown(int fd, int how);! –  Shuts down a socket w/o closing file descriptor –  how: 0 = read, 1 = write, 2 = both –  Note: applies to socket, not descriptor, so copies of descriptor (through fork or dup affected) –  Note 2: with TCP, can’t detect if other side shuts for reading Using UDP •  Call socket with SOCK_DGRAM, bi...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online