Include syssocketh int bindint sockfd struct sockaddr

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: t by a careless backhoe operator — the stream of bytes sent by the source process is eventually received by the destination process in the same order it was sent. A socket is an endpoint of a connection. Each socket has a corresponding socket address that consists of an Internet address and an 16-bit integer port, and is denoted by address:port. The port in the client’s socket address is assigned automatically by the kernel when the client makes a connection request, and is known as an ephemeral port. However, the port in the server’s socket address is typically some well-known port that is associated with the service. For example, Web servers typically use port 80, and email servers use port 25. On Unix machines, the file /etc/services contains a comprehensive list of the services provided on that machine, along with their well-known ports. A connection is uniquely identified by the socket addresses of its two endpoints. This pair of socket addresses is known as a socket pair and is denoted by the tuple (cliaddr:cliport, servaddr:servport) where cliaddr is the client’s IP addres...
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