Home Segments Index Top Previous Next

730: Mainline

Once a client has sought a connection with the server, it is up to the server to accept the connection. Acceptance is arranged via a call to accept:

new_socket_number 
 = accept (socket_number, 
           (struct sockaddr *) &client_addr, 
           &client_length); 

The first argument, yet again, is the socket number established by the call to socket. The second and third arguments are supplied via addresses so that the accept call can supply the server with information about the client. In the server developed here, this information is not used.