public class MethodSelecionResponseMessage extends Object implements WritableMessage
MethodSelecionResponseMessage
represents response message for method
selection message. This message is always sent by SOCKS server.Constructor and Description |
---|
MethodSelecionResponseMessage()
Constructs an instance of
MethodSelecionResponseMessage |
MethodSelecionResponseMessage(int version,
int method)
Constructs an instance of
MethodSelecionResponseMessage with a version and a method. |
MethodSelecionResponseMessage(int version,
SocksMethod socksMethod)
Constructs an instance of
MethodSelecionResponseMessage with a version and a method. |
MethodSelecionResponseMessage(SocksMethod socksMethod)
Constructs an instance of
MethodSelecionResponseMessage with a method. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Returns the byte array of the message.
|
int |
getLength()
Returns the length of message.
|
int |
getMethod()
REturn value of selected method.
|
int |
getVersion()
Returns version.
|
void |
setMethod(int method)
Sets selected method with an integer.
|
void |
setVersion(int version)
Sets version.
|
public MethodSelecionResponseMessage()
MethodSelecionResponseMessage
public MethodSelecionResponseMessage(SocksMethod socksMethod)
MethodSelecionResponseMessage
with a method.socksMethod
- Selected method.public MethodSelecionResponseMessage(int version, int method)
MethodSelecionResponseMessage
with a version and a method.version
- Version.method
- Value of selected method.public MethodSelecionResponseMessage(int version, SocksMethod socksMethod)
MethodSelecionResponseMessage
with a version and a method.version
- Version.socksMethod
- Selected method.public byte[] getBytes()
WritableMessage
getBytes
in interface WritableMessage
public int getLength()
Message
public int getVersion()
public void setVersion(int version)
version
- Version.public int getMethod()
public void setMethod(int method)
method
- Value of a method.Copyright © 2015. All rights reserved.