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

BOOL PSocket::Accept ( PSocket socket  )  [virtual, inherited]

Open a socket to a remote host on the specified port number. This is an "accepting" socket. When a "listening" socket has a pending connection to make, this will accept a connection made by the "connecting" socket created to establish a link.

The port that the socket uses is the one used in the Listen()# command of the socket# parameter. Note an error occurs if the socket# parameter has not had the Listen()# function called on it.

Note that this function will block until a remote system connects to the port number specified in the "listening" socket. The time that the function will block is determined by the read timeout of the socket# parameter. This will normally be PMaxTimeInterval# which indicates an infinite time.

The default behaviour is to assert.

TRUE if the channel was successfully opened.
socket  Listening socket making the connection.

Reimplemented in PSocksSocket, PTelnetSocket, PSPXSocket, and PTCPSocket.

Definition at line 1469 of file sockets.cxx.

  PAssertAlways("Illegal operation.");
  return FALSE;

Generated by  Doxygen 1.6.0   Back to index