Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PSocksUDPSocket Class Reference

#include <socks.h>

Inheritance diagram for PSocksUDPSocket:

PUDPSocket PSocksProtocol PIPDatagramSocket PIPSocket PSocket PChannel PObject List of all members.

Public Methods

 PSocksUDPSocket (WORD port=0)
 PSocksUDPSocket (const PString &host, WORD port=0)
virtual PObjectClone () 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 Methods

virtual void SetErrorCodes (PChannel::Errors errCode, int osErr)

Protected Attributes

PTCPSocket socksControl
Address serverAddress

Detailed Description

This class allows access to RFC1928 compliant SOCKS server.


Constructor & Destructor Documentation

PSocksUDPSocket::PSocksUDPSocket WORD    port = 0
 

PSocksUDPSocket::PSocksUDPSocket const PString   host,
WORD    port = 0
 


Member Function Documentation

virtual PObject* PSocksUDPSocket::Clone   [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 <A>PDictionary class as it requires copies of the dictionary keys.

The default behaviour is for this function to assert.

Returns:
pointer to new copy of the class instance.

Reimplemented from PObject.

virtual BOOL PSocksUDPSocket::Connect const Address &    addr [virtual]
 

Reimplemented from PIPSocket.

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 <A>PIPSocket::SetPort() function.

Returns:
TRUE if the channel was successfully connected to the remote host.

Reimplemented from PUDPSocket.

virtual BOOL PSocksUDPSocket::GetLocalAddress Address &    addr,
WORD &    port
[virtual]
 

Reimplemented from PIPSocket.

virtual BOOL PSocksUDPSocket::GetLocalAddress Address &    addr [virtual]
 

Get the Internet Protocol address for the local host.

Returns:
TRUE if the IP number was returned.

Reimplemented from PIPSocket.

virtual BOOL PSocksUDPSocket::GetPeerAddress Address &    addr,
WORD &    port
[virtual]
 

Reimplemented from PIPSocket.

virtual BOOL PSocksUDPSocket::GetPeerAddress Address &    addr [virtual]
 

Get the Internet Protocol address for the peer host the socket is connected to.

Returns:
TRUE if the IP number was returned.

Reimplemented from PIPSocket.

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 <A>PIPSocket::SetPort() function.

For the UDP protocol, the queueSize parameter is ignored.

Returns:
TRUE if the channel was successfully opened.

Reimplemented from PIPSocket.

virtual BOOL PSocksUDPSocket::ReadFrom void *    buf,
PINDEX    len,
Address &    addr,
WORD &    port
[virtual]
 

Read a datagram from a remote computer.

Returns:
TRUE if any bytes were sucessfully read.

Reimplemented from PIPDatagramSocket.

virtual void PSocksUDPSocket::SetErrorCodes PChannel::Errors    errCode,
int    osErr
[protected, virtual]
 

Implements PSocksProtocol.

virtual BOOL PSocksUDPSocket::WriteTo const void *    buf,
PINDEX    len,
const Address &    addr,
WORD    port
[virtual]
 

Write a datagram to a remote computer.

Returns:
TRUE if all the bytes were sucessfully written.

Reimplemented from PIPDatagramSocket.


Member Data Documentation

Address PSocksUDPSocket::serverAddress [protected]
 

PTCPSocket PSocksUDPSocket::socksControl [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Mar 2 19:54:40 2005 for PWLib by doxygen1.2.18