#include <spxsock.h>
Inheritance diagram for PSPXSocket:
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 |
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.
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.
port | Port number to use for the connection. |
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.
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.
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.
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.