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

BOOL PTCPSocket::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.

TRUE if the channel was successfully opened.
queueSize  Number of pending accepts that may be queued.
port  Port number to use for the connection.
reuse  Can/Can't listen more than once.

Reimplemented from PIPSocket.

Reimplemented in PSocksSocket.

Definition at line 2735 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