Http is a simple protocol a web client known as a

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: ess data. */ }; /* Internet-style socket address struct sockaddr_in { unsigned short sin_family; unsigned short sin_port; struct in_addr sin_addr; unsigned char sin_zero[8]; }; structure */ /* /* /* /* address family (always AF_INET) */ port number in network byte order */ IP address in network byte order */ pad to sizeof(struct sockaddr) */ sockaddr: socketbits.h (included by socket.h). sockaddr in: netinit/in.h Figure 12.23: Socket address structures. The in addr struct is shown in Figure 12.9. 12.5. THE SOCKETS INTERFACE each of which was expected to define its own 16-byte protocol-specific sockaddr xx socket address structure. No one at the time had any inkling that TCP/IP would become so dominant. End Aside. 631 The connect, bind, and accept functions require a pointer to protocol-specific socket address structure. The problem faced by the designers of the sockets interface was how to define these functions to accept any kind of socket address structure. Today we would use the generic void * pointer, which did not exist in C at that time. The s...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online