HTTP_Request2
[ class tree: HTTP_Request2 ] [ index: HTTP_Request2 ] [ all elements ]

Class: HTTP_Request2_SOCKS5

Source Location: /HTTP_Request2-2.2.1/HTTP/Request2/SOCKS5.php

Class Overview

HTTP_Request2_SocketWrapper
   |
   --HTTP_Request2_SOCKS5

SOCKS5 proxy connection class (used by Socket Adapter)


Author(s):

Version:

  • Release: 2.2.1

Methods


Inherited Variables

Inherited Methods

Class: HTTP_Request2_SocketWrapper

HTTP_Request2_SocketWrapper::__construct()
Class constructor, tries to establish connection
HTTP_Request2_SocketWrapper::checkTimeout()
Throws an Exception if stream timed out
HTTP_Request2_SocketWrapper::connectionWarningsHandler()
Error handler to use during stream_socket_client() call
HTTP_Request2_SocketWrapper::enableCrypto()
Turns on encryption on a socket
HTTP_Request2_SocketWrapper::eof()
Tests for end-of-file on a socket
HTTP_Request2_SocketWrapper::read()
Wrapper around fread(), handles global request timeout
HTTP_Request2_SocketWrapper::readLine()
Reads until either the end of the socket or a newline, whichever comes first
HTTP_Request2_SocketWrapper::setDeadline()
Sets request deadline
HTTP_Request2_SocketWrapper::write()
Wrapper around fwrite(), handles global request timeout
HTTP_Request2_SocketWrapper::__destruct()
Destructor, disconnects socket

Class Details

[line 36]
SOCKS5 proxy connection class (used by Socket Adapter)


[ Top ]


Method Detail

__construct (Constructor)   [line 51]

HTTP_Request2_SOCKS5 __construct( string $address, [int $timeout = 10], [ $contextOptions = array()], [string $username = null], [string $password = null])

Constructor, tries to connect and authenticate to a SOCKS5 proxy
  • Throws: HTTP_Request2_LogicException
  • Throws: HTTP_Request2_ConnectionException
  • Throws: HTTP_Request2_MessageException
  • Access: public

Overrides HTTP_Request2_SocketWrapper::__construct() (Class constructor, tries to establish connection)

Parameters:

string   $address     Proxy address, e.g. 'tcp://localhost:1080'
int   $timeout     Connection timeout (seconds)
array   $contextOptions     Stream context options
string   $username     Proxy user name
string   $password     Proxy password

[ Top ]

connect   [line 115]

void connect( string $remoteHost, int $remotePort)

Connects to a remote host via proxy
  • Throws: HTTP_Request2_MessageException
  • Throws: HTTP_Request2_ConnectionException
  • Access: public

Parameters:

string   $remoteHost     Remote host
int   $remotePort     Remote port

[ Top ]

performAuthentication   [line 92]

void performAuthentication( string $username, string $password)

Performs username/password authentication for SOCKS5

Parameters:

string   $username     Proxy user name
string   $password     Proxy password

[ Top ]


Documentation generated on Thu, 16 Jan 2014 20:00:09 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.