#include <socks.h>
Inheritance diagram for PSocksUDPSocket:
Public Member Functions | |
PSocksUDPSocket (WORD port=0) | |
PSocksUDPSocket (const PString &host, WORD port=0) | |
virtual PObject * | Clone () const |
virtual PBoolean | Connect (const PString &address) |
virtual PBoolean | Connect (const Address &addr) |
virtual PBoolean | Listen (unsigned queueSize=5, WORD port=0, Reusability reuse=AddressIsExclusive) |
virtual PBoolean | GetLocalAddress (Address &addr) |
virtual PBoolean | GetLocalAddress (Address &addr, WORD &port) |
virtual PBoolean | GetPeerAddress (Address &addr) |
virtual PBoolean | GetPeerAddress (Address &addr, WORD &port) |
virtual PBoolean | ReadFrom (void *buf, PINDEX len, Address &addr, WORD &port) |
virtual PBoolean | WriteTo (const void *buf, PINDEX len, const Address &addr, WORD port) |
Protected Member Functions | |
virtual void | SetErrorCodes (PChannel::Errors errCode, int osErr) |
Protected Attributes | |
PTCPSocket | socksControl |
Address | serverAddress |
PSocksUDPSocket::PSocksUDPSocket | ( | WORD | port = 0 |
) |
PSocksUDPSocket::PSocksUDPSocket | ( | const PString & | host, | |
WORD | port = 0 | |||
) |
virtual PObject* PSocksUDPSocket::Clone | ( | ) | const [virtual] |
Create a copy of the class on the heap. The exact semantics of the descendent class determine what is required to make a duplicate of the instance. Not all classes can even do a clone operation.
The main user of the clone function is the PDictionary class as it requires copies of the dictionary keys.
The default behaviour is for this function to assert.
Reimplemented from PObject.
Connect a socket to a remote host on the specified port number. This is typically used by the client or initiator of a communications channel. This connects to a "listening" socket at the other end of the communications channel.
The port number as defined by the object instance construction or the PIPSocket::SetPort() function.
Reimplemented from PUDPSocket.
virtual PBoolean PSocksUDPSocket::Connect | ( | const Address & | addr | ) | [virtual] |
virtual PBoolean PSocksUDPSocket::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.
For the UDP protocol, the queueSize
parameter is ignored.
Reimplemented from PIPSocket.
virtual PBoolean PSocksUDPSocket::GetLocalAddress | ( | Address & | addr | ) | [virtual] |
Get the Internet Protocol address for the local host.
virtual PBoolean PSocksUDPSocket::GetLocalAddress | ( | Address & | addr, | |
WORD & | port | |||
) | [virtual] |
virtual PBoolean PSocksUDPSocket::GetPeerAddress | ( | Address & | addr | ) | [virtual] |
Get the Internet Protocol address for the peer host the socket is connected to.
virtual PBoolean PSocksUDPSocket::GetPeerAddress | ( | Address & | addr, | |
WORD & | port | |||
) | [virtual] |
virtual PBoolean PSocksUDPSocket::ReadFrom | ( | void * | buf, | |
PINDEX | len, | |||
Address & | addr, | |||
WORD & | port | |||
) | [virtual] |
Read a datagram from a remote computer.
Reimplemented from PIPDatagramSocket.
virtual PBoolean PSocksUDPSocket::WriteTo | ( | const void * | buf, | |
PINDEX | len, | |||
const Address & | addr, | |||
WORD | port | |||
) | [virtual] |
Write a datagram to a remote computer.
Reimplemented from PIPDatagramSocket.
virtual void PSocksUDPSocket::SetErrorCodes | ( | PChannel::Errors | errCode, | |
int | osErr | |||
) | [protected, virtual] |
Implements PSocksProtocol.
PTCPSocket PSocksUDPSocket::socksControl [protected] |
Address PSocksUDPSocket::serverAddress [protected] |