| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsocks.ProxyMessage
public abstract class ProxyMessage
Abstract class which describes SOCKS4/5 response/request.
| Field Summary | |
|---|---|
|  int | commandRequest/response code as an int | 
|  java.lang.String | hostHost as string. | 
|  java.net.InetAddress | ipHost as an IP address | 
|  int | portPort field of the request/response | 
|  java.lang.String | userUser field for SOCKS4 request messages | 
|  int | versionSOCKS version, or version of the response for SOCKS4 | 
| Method Summary | |
|---|---|
|  java.net.InetAddress | getInetAddress()Get the Address field of this message as InetAddress object. | 
| abstract  void | read(java.io.InputStream in)Initialises Message from the stream. | 
| abstract  void | read(java.io.InputStream in,
     boolean client_mode)Initialises Message from the stream. | 
|  java.lang.String | toString()Get string representaion of this message. | 
| abstract  void | write(java.io.OutputStream out)Writes the message to the stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public java.net.InetAddress ip
public int version
public int port
public int command
public java.lang.String host
public java.lang.String user
| Method Detail | 
|---|
public abstract void read(java.io.InputStream in)
                   throws SocksException,
                          java.io.IOException
in - Input stream to read response from.
SocksException - If server response code is not SOCKS_SUCCESS(0), or
     if any error with protocol occurs.
java.io.IOException - If any error happens with I/O.
public abstract void read(java.io.InputStream in,
                          boolean client_mode)
                   throws SocksException,
                          java.io.IOException
in - Input stream to read response from.clinetMode - If true read server response, else read client request.
SocksException - If server response code is not SOCKS_SUCCESS(0) and
     reading in client mode, or if any error with protocol occurs.
java.io.IOException - If any error happens with I/O.
public abstract void write(java.io.OutputStream out)
                    throws SocksException,
                           java.io.IOException
out - Output stream to which message should be written.
SocksException
java.io.IOException
public java.net.InetAddress getInetAddress()
                                    throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic java.lang.String toString()
toString in class java.lang.Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||