Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PIPSocket::Listen ( unsigned  queueSize = 5,
WORD  port = 0,
Reusability  reuse = AddressIsExclusive 
) [virtual, inherited]

Listen on a socket for a remote host on the specified port number. This may be used for server based applications. A "connecting" socket begins a connection by initiating a connection to this socket. An active socket of this type is then used to generate other "accepting" sockets which establish a two way communications channel with the "connecting" socket.

If the port# parameter is zero then the port number as defined by the object instance construction or the PIPSocket::SetPort()# function.

For the UDP protocol, the queueSize# parameter is ignored.

TRUE if the channel was successfully opened.
queueSizeNumber of pending accepts that may be queued.
portPort number to use for the connection.
reuseCan/Cant listen more than once.

Reimplemented from PSocket.

Reimplemented in PSocksSocket, PSocksUDPSocket, and PTCPSocket.

Definition at line 2053 of file sockets.cxx.

#if P_HAS_IPV6
  return Listen(GetDefaultIpAny(), queueSize, newPort, reuse);
  return Listen(INADDR_ANY, queueSize, newPort, reuse);

Generated by  Doxygen 1.6.0   Back to index