Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Connection request by the client

&pagelevel(5)&pagelevel

The client requests services from the server by sending a connection request to the socket of the server with the connect() function. On the client side, the connect() call causes a connection to be set up.

In the Internet domain AF_INET, a connection request progresses as follows:

struct sockaddr_in server;
 ...
connect(s, &server, sizeof server);

In the Internet domain AF_INET6, a connection request progresses as follows:

struct sockaddr_in6 server;
 ...
connect(s, &server, sizeof server);

The server parameter passes the Internet address and port number of the server with which the client wishes to communicate.
If the client’s socket has no name assigned at the time of the connect() call, the system selects a name automatically and assigns it to the socket.

If connection setup is unsuccessful, an error code is returned. This can occur, e.g. if the server is not ready to accept a connection (see the section "Connection acceptance by the server"). However, all names assigned automatically by the system are retained even if the connection setup fails.