|
||||||||||
| 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 |
command
Request/response code as an int |
String |
host
Host as string. |
InetAddress |
ip
Host as an IP address |
int |
port
Port field of the request/response |
String |
user
User field for SOCKS4 request messages |
int |
version
SOCKS version, or version of the response for SOCKS4 |
| Method Summary | |
|---|---|
InetAddress |
getInetAddress()
Get the Address field of this message as InetAddress object. |
abstract void |
read(InputStream in)
Initialises Message from the stream. |
abstract void |
read(InputStream in,
boolean client_mode)
Initialises Message from the stream. |
String |
toString()
Get string representaion of this message. |
abstract void |
write(OutputStream out)
Writes the message to the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public InetAddress ip
public int version
public int port
public int command
public String host
public String user
| Method Detail |
|---|
public abstract void read(InputStream in)
throws SocksException,
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.
IOException - If any error happens with I/O.
public abstract void read(InputStream in,
boolean client_mode)
throws SocksException,
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.
IOException - If any error happens with I/O.
public abstract void write(OutputStream out)
throws SocksException,
IOException
out - Output stream to which message should be written.
SocksException
IOException
public InetAddress getInetAddress()
throws UnknownHostException
UnknownHostExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||