AN_BIND_TOSOCKADDRSection: Antinat Programmer's Manual (3)
Index Return to Main Contents
The an_bind_tosockaddr(3) function is used allow incoming connections from the specified address. In order to accept any incoming connection, an_listen(3) must be called on the bound socket. For proxy-based connections, only one incoming connection is allowed on any listening socket. Accepting a connection will use the primary socket for communication and will not create any other socket.
s is a socket previously created with an_new_connection(3) call.
address is a filled out sockaddr structure, containing an address family, address, and port that an incoming connection should be allowed from.
Although there is planned support for non-blocking sockets in a future release, this call should be considered a blocking call. A non-blocking socket will be silently (and temporarily) changed to a blocking one to process the connection.
- The proxy would not accept the authentication credentials that were supplied to it.
- The socket handle is invalid, or the address structure doesn't point to anything.
- Could not resolve the proxy hostname into an address.
- This call cannot be made on the type of socket, or cannot return socket information for this type of connection.
- This call must be called without having performed any operation on the socket other than an_new_connection(3).
- Could not read information from the network; a network error occurred.
- The proxy failed to successfully process the incoming connection.
Malcolm Smith <email@example.com>
Time: 14:19:43 GMT, January 09, 2005