Unix Network Programming, Volume 1: Networking APIs – Sockets and XTI
dear reader,
NO JOKE there is a HUGE grey, windowless schoolbus outside my window right now! what a world we live in, am i right?!
anyway, enough jokes! the time for joking around is over! now it’s time to get serious, and we’ll be doing that today by discussing the seminal thriller, “unix network programming” by, well, i can’t remember his name, but fuck he is smart. ok, let’s go!
REVIEW:
excellently organized.
begins with overview of the OSI model, discussing the lower (transport: TCP/IP) layer first.
great tcp client-server example.
in-depth explanation of select() and poll() and ioctl().
good API reference.
iterative vs. concurrent, multi-process vs. single-process.
VERDICT:
portno = atoi(argv[2]);
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0)
error(“ERROR opening socket”);
server = gethostbyname(argv[1]);
yes!