public class CommandResponseMessage extends Object implements WritableMessage
CommandResponseMessage
represents a command response message.Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger
Logger that subclasses also can use.
|
Constructor and Description |
---|
CommandResponseMessage(int version,
ServerReply reply,
InetAddress bindAddress,
int bindPort)
Constructs a
CommandResponseMessage . |
CommandResponseMessage(ServerReply reply)
Constructs a
CommandResponseMessage by ServerReply . |
Modifier and Type | Method and Description |
---|---|
int |
getAddressType()
Returns address type.
|
InetAddress |
getBindAddress()
Returns bind address.
|
int |
getBindPort()
Returns bind port.
|
byte[] |
getBytes()
Returns the byte array of the message.
|
int |
getLength()
Returns the length of message.
|
ServerReply |
getReply()
Returns the reply of SOCKS server.
|
int |
getVersion()
Returns version.
|
void |
setAddressType(int addressType)
Sets address type.
|
void |
setBindAddress(InetAddress bindAddress)
Sets bind address.
|
void |
setBindPort(int bindPort)
Sets bind port.
|
void |
setReply(ServerReply reply)
Sets SOCKS server's reply.
|
void |
setVersion(int version)
Sets version.
|
protected static final org.slf4j.Logger logger
public CommandResponseMessage(ServerReply reply)
CommandResponseMessage
by ServerReply
.reply
- Reply from server.public CommandResponseMessage(int version, ServerReply reply, InetAddress bindAddress, int bindPort)
CommandResponseMessage
.version
- Versionreply
- Sever reply.bindAddress
- Bind IP address.bindPort
- Bind port.public byte[] getBytes()
WritableMessage
getBytes
in interface WritableMessage
public int getLength()
Message
public int getVersion()
public void setVersion(int version)
version
- Version.public int getAddressType()
public void setAddressType(int addressType)
addressType
- Address type.public InetAddress getBindAddress()
public void setBindAddress(InetAddress bindAddress)
bindAddress
- Bind address.public int getBindPort()
public void setBindPort(int bindPort)
bindPort
- Bind port.public ServerReply getReply()
public void setReply(ServerReply reply)
reply
- Reply of the SOKS server.Copyright © 2015. All rights reserved.