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

PSocksProtocol Class Reference

#include <socks.h>

Inheritance diagram for PSocksProtocol:

PSocksSocket PSocksUDPSocket PSocks4Socket PSocks5Socket List of all members.

Public Types

enum  { DefaultServerPort = 1080 }

Public Methods

 PSocksProtocol (WORD port)
virtual ~PSocksProtocol ()
BOOL SetServer (const PString &hostname, const char *service="socks 1080")
BOOL SetServer (const PString &hostname, WORD port)
void SetAuthentication (const PString &username, const PString &password)

Protected Methods

BOOL ConnectSocksServer (PTCPSocket &thisSocket)
virtual void SetErrorCodes (PChannel::Errors errCode, int osErr)=0
virtual BOOL SendSocksCommand (PTCPSocket &socket, BYTE command, const char *hostname, PIPSocket::Address addr)
virtual BOOL ReceiveSocksResponse (PTCPSocket &socket, PIPSocket::Address &addr, WORD &port)

Protected Attributes

PString serverHost
WORD serverPort
PString authenticationUsername
PString authenticationPassword
PIPSocket::Address remoteAddress
WORD remotePort
PIPSocket::Address localAddress
WORD localPort

Detailed Description

Base class for implementing the SOCKS protocol for use with PSocksSocket and PSocksUDPSocket.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DefaultServerPort 


Constructor & Destructor Documentation

PSocksProtocol::PSocksProtocol WORD    port
 

virtual PSocksProtocol::~PSocksProtocol   [inline, virtual]
 


Member Function Documentation

BOOL PSocksProtocol::ConnectSocksServer PTCPSocket   thisSocket [protected]
 

virtual BOOL PSocksProtocol::ReceiveSocksResponse PTCPSocket   socket,
PIPSocket::Address   addr,
WORD &    port
[protected, virtual]
 

Reimplemented in PSocks4Socket.

virtual BOOL PSocksProtocol::SendSocksCommand PTCPSocket   socket,
BYTE    command,
const char *    hostname,
PIPSocket::Address    addr
[protected, virtual]
 

Reimplemented in PSocks4Socket.

void PSocksProtocol::SetAuthentication const PString   username,
const PString   password
 

Set the username and password for the SOCKS server authentication. This is for the cleartext authentication only, GSSAPI, Kerberos etc is not yet supported.

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

Implemented in PSocksSocket, and PSocksUDPSocket.

BOOL PSocksProtocol::SetServer const PString   hostname,
WORD    port
 

BOOL PSocksProtocol::SetServer const PString   hostname,
const char *    service = "socks 1080"
 


Member Data Documentation

PString PSocksProtocol::authenticationPassword [protected]
 

PString PSocksProtocol::authenticationUsername [protected]
 

PIPSocket::Address PSocksProtocol::localAddress [protected]
 

WORD PSocksProtocol::localPort [protected]
 

PIPSocket::Address PSocksProtocol::remoteAddress [protected]
 

WORD PSocksProtocol::remotePort [protected]
 

PString PSocksProtocol::serverHost [protected]
 

WORD PSocksProtocol::serverPort [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Aug 13 15:50:10 2004 for PWLib by doxygen1.2.18