PHP WebSocket2 Library
PHP5 Library for browsing web
SocksProxy Class Reference

Base class for SOCKS proxy. More...

Inheritance diagram for SocksProxy:
WebProxy HttpSocket Socks4AProxy Socks4Proxy Socks5Proxy

Public Member Functions

 sendRequest (WebRequest $request)
 
- Public Member Functions inherited from WebProxy
 __construct ($address, $port)
 Constructor. More...
 
 setAuth ($login, $password)
 Sets login and password for proxy. More...
 
 getLogin ()
 Returns login for proxy. More...
 
 getPassword ()
 Returns password for proxy. More...
 
 hasAuth ()
 Returns true if proxy needs to be authenticated. More...
 
 setSocket (HttpSocket $socket)
 Sets socket for proxy. This can be another proxy or network socket. More...
 
 writeRaw ($request)
 
- Public Member Functions inherited from HttpSocket
 __destruct ()
 Destructor.
 
 sendRequest (WebRequest $request)
 Sends request to socket and returns response. More...
 
 writeRaw ($request)
 Writes raw data to socket. More...
 

Protected Member Functions

 authorize ($address, $port)
 Performs authorization of SOCKS proxy, connects it to target host. More...
 
- Protected Member Functions inherited from WebProxy
 open ($address, $port)
 
 read ($size)
 
 close ()
 
 isOpen ()
 
 readLength ($length, $headers, WebRequest $request, &$aborted)
 
 readAll ($headers, WebRequest $request)
 
- Protected Member Functions inherited from HttpSocket
 open ($address, $port)
 Opens socket. More...
 
 read ($size)
 Reads raw data from socket. More...
 
 close ()
 Closes socket.
 
 isOpen ()
 Returns true if socket is open. More...
 
 readChunked ($headers, WebRequest $request)
 Reads chunked content from socket and puts chunks to single string. More...
 
 readLength ($length, $headers, WebRequest $request, &$aborted)
 Reads data with specified length from socket. If socket closes connection or no more data is available to reach length, throws WebRequestException. More...
 
 readAll ($headers, WebRequest $request)
 Reads all available data from socket until it closes connection. More...
 
 readUntil ($text)
 Reads all available data from socket until specified substring is found inside contents. More...
 
 readHeaders ()
 Reads response headers. More...
 
 write (WebRequest $request)
 Writes request to socket. More...
 

Additional Inherited Members

- Protected Attributes inherited from WebProxy
 $socket = null
 
 $login = null
 
 $password = null
 
 $address
 
 $port
 

Detailed Description

Base class for SOCKS proxy.

Member Function Documentation

authorize (   $address,
  $port 
)
abstractprotected

Performs authorization of SOCKS proxy, connects it to target host.

Parameters
string$addressTarget host address
int$portTarget host port
Exceptions
WebRequestExceptionin case of error

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