E-MailRelay
Public Member Functions | Static Public Member Functions | List of all members
GNet::Socks Class Reference

Implements the SOCKS4a proxy connection protocol. More...

#include <gsocks.h>

Public Member Functions

 Socks (const Location &)
 Constructor. More...
 
bool send (G::ReadWrite &)
 Sends the connect-request pdu using the given file descriptor. More...
 
bool read (G::ReadWrite &)
 Reads the response using the given file descriptor. More...
 

Static Public Member Functions

static std::string buildPdu (const std::string &far_host, unsigned int far_port)
 Builds a SOCKS4a connect request pdu. More...
 

Detailed Description

Implements the SOCKS4a proxy connection protocol.

Definition at line 38 of file gsocks.h.

Constructor & Destructor Documentation

◆ Socks()

GNet::Socks::Socks ( const Location location)
explicit

Constructor.

Definition at line 27 of file gsocks.cpp.

Member Function Documentation

◆ buildPdu()

std::string GNet::Socks::buildPdu ( const std::string &  far_host,
unsigned int  far_port 
)
static

Builds a SOCKS4a connect request pdu.

Definition at line 39 of file gsocks.cpp.

◆ read()

bool GNet::Socks::read ( G::ReadWrite io)

Reads the response using the given file descriptor.

Returns true if fully received and positive. Throws if the response is negative.

Definition at line 90 of file gsocks.cpp.

◆ send()

bool GNet::Socks::send ( G::ReadWrite io)

Sends the connect-request pdu using the given file descriptor.

Returns true if fully sent.

Definition at line 64 of file gsocks.cpp.


The documentation for this class was generated from the following files: