PSPXSocket Class Reference

#include <spxsock.h>

Inheritance diagram for PSPXSocket:

PIPXSocket PSocket PChannel PObject List of all members.

Public Member Functions

Overrides from class PSocket.
virtual PBoolean Listen (unsigned queueSize=5, WORD port=0, Reusability reuse=AddressIsExclusive)
virtual PBoolean Accept (PSocket &socket)

Protected Member Functions

virtual PBoolean OpenSocket ()
virtual const char * GetProtocolName () const

Detailed Description

Create a socket channel that uses the SPX transport over the IPX Protocol.


Constructor & Destructor Documentation

PSPXSocket::PSPXSocket ( WORD  port = 0  ) 

Create an SPX protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.

Note that the "copy" constructor here is really a "listening" socket the same as the PSocket & parameter version.

Parameters:
port  Port number to use for the connection.

PSPXSocket::PSPXSocket ( WORD  port = 0  ) 

Create an SPX protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.

Note that the "copy" constructor here is really a "listening" socket the same as the PSocket & parameter version.

Parameters:
port  Port number to use for the connection.


Member Function Documentation

virtual PBoolean PSPXSocket::Listen ( unsigned  queueSize = 5,
WORD  port = 0,
Reusability  reuse = AddressIsExclusive 
) [virtual]

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.

Returns:
PTrue if the channel was successfully opened.
Parameters:
queueSize  Number of pending accepts that may be queued.
port  Port number to use for the connection.
reuse  Can/Cant listen more than once.

Reimplemented from PIPXSocket.

virtual PBoolean PSPXSocket::Accept ( PSocket socket  )  [virtual]

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 that this function will block until a remote system connects to the port number specified in the "listening" socket.

Returns:
PTrue if the channel was successfully opened.
Parameters:
socket  Listening socket making the connection.

Reimplemented from PSocket.

virtual PBoolean PSPXSocket::OpenSocket (  )  [protected, virtual]

Reimplemented from PIPXSocket.

virtual const char* PSPXSocket::GetProtocolName (  )  const [protected, virtual]

This function returns the protocol name for the socket type.

Reimplemented from PIPXSocket.


The documentation for this class was generated from the following file:
Generated on Mon Sep 15 01:21:38 2008 for PTLib by  doxygen 1.5.1