#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 BOOL | Connect (const PString &address) |
virtual BOOL | Connect (const Address &addr) |
virtual BOOL | Listen (unsigned queueSize=5, WORD port=0, Reusability reuse=AddressIsExclusive) |
virtual BOOL | GetLocalAddress (Address &addr) |
virtual BOOL | GetLocalAddress (Address &addr, WORD &port) |
virtual BOOL | GetPeerAddress (Address &addr) |
virtual BOOL | GetPeerAddress (Address &addr, WORD &port) |
virtual BOOL | ReadFrom (void *buf, PINDEX len, Address &addr, WORD &port) |
virtual BOOL | 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.
virtual BOOL PSocksUDPSocket::Connect | ( | const PString & | address | ) | [virtual] |
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 BOOL PSocksUDPSocket::Connect | ( | const Address & | addr | ) | [virtual] |
virtual BOOL 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 BOOL PSocksUDPSocket::GetLocalAddress | ( | Address & | addr | ) | [virtual] |
Get the Internet Protocol address for the local host.
virtual BOOL PSocksUDPSocket::GetLocalAddress | ( | Address & | addr, | |
WORD & | port | |||
) | [virtual] |
virtual BOOL PSocksUDPSocket::GetPeerAddress | ( | Address & | addr | ) | [virtual] |
Get the Internet Protocol address for the peer host the socket is connected to.
virtual BOOL PSocksUDPSocket::GetPeerAddress | ( | Address & | addr, | |
WORD & | port | |||
) | [virtual] |
virtual BOOL PSocksUDPSocket::ReadFrom | ( | void * | buf, | |
PINDEX | len, | |||
Address & | addr, | |||
WORD & | port | |||
) | [virtual] |
Read a datagram from a remote computer.
Reimplemented from PIPDatagramSocket.
virtual BOOL 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] |