Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ITcpSocket::accept ( P6NETADDR *  pAddr,
P6INTERVAL  timeout,
p6ITcpSocket **  ppSocket 
)
pure virtual

Accepts an incomming connection attempt on the the socket.

It gets the first connection from the queue of pending connections, create a new socket for the connection, and then returns the newly created socket.

Parameters
pAddrA pointer to a P6R::P6NETADDR in which to place the address of the remote endpoint of the connection. If this information is not needed, NULL can be passed.
timeoutA P6R::P6INTERVAL specifying the amount of time accept should what for a connection before returning. This can be P6WAITINFINITE which will cause the method wait for a connection forever, P6WAITNONE which will cause the method to check for a connection and return immediately, of a valid interval time value.
ppSocketThe address of a p6ITcpSocket interface pointer in which the newly accepted socket will be placed.
Returns