public class CommandReplyMesasge extends Object implements SocksMessage
RequestCmdReplyMesasge
represents the message that
sent by SOCKS server when client sends a command request.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger
Logger that subclasses also can use.
|
Constructor and Description |
---|
CommandReplyMesasge(byte[] replyBytes)
Constructs an instance of
CommandReplyMesasge with an array of
bytes that received from SOCKS server. |
Modifier and Type | Method and Description |
---|---|
InetAddress |
getIp()
Gets IP address from the bytes that sent by SOCKS server.
|
int |
getPort()
Gets port from bytes that sent by SOCKS server.
|
byte[] |
getReplyBytes()
Returns the bytes that sent by SOCKS server.
|
SocketAddress |
getSocketAddress()
Gets the socket address.
|
boolean |
isSuccess()
Returns
true if the command request is success. |
void |
setReplyBytes(byte[] replyBytes)
Sets reply bytes.
|
public CommandReplyMesasge(byte[] replyBytes)
CommandReplyMesasge
with an array of
bytes that received from SOCKS server.replyBytes
- The bytes that received from SOCKS server.public boolean isSuccess()
true
if the command request is success.true
.public InetAddress getIp() throws UnknownHostException
UnknownHostException
- If the host is unknown.public int getPort()
public byte[] getReplyBytes()
public void setReplyBytes(byte[] replyBytes)
replyBytes
- The bytes that sent by SOCKS server.public SocketAddress getSocketAddress()
Copyright © 2015. All rights reserved.