public abstract class SocksRequest extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
SocksRequest(TorConfig config,
Socket socket) |
| Modifier and Type | Method and Description |
|---|---|
IPv4Address |
getAddress() |
abstract int |
getCommandCode() |
String |
getHostname() |
int |
getPort() |
String |
getTarget() |
boolean |
hasHostname() |
abstract boolean |
isConnectRequest() |
protected void |
readAll(byte[] buffer) |
protected void |
readAll(byte[] buffer,
int offset,
int length) |
protected int |
readByte() |
protected byte[] |
readIPv4AddressData() |
protected byte[] |
readIPv6AddressData() |
protected String |
readNullTerminatedString() |
protected byte[] |
readPortData() |
abstract void |
readRequest() |
protected void |
setHostname(String name) |
protected void |
setIPv4AddressData(byte[] data) |
protected void |
setPortData(byte[] data) |
protected void |
socketWrite(byte[] buffer) |
public abstract void readRequest()
throws SocksRequestException
SocksRequestExceptionpublic abstract int getCommandCode()
public abstract boolean isConnectRequest()
public int getPort()
public IPv4Address getAddress()
public boolean hasHostname()
public String getHostname()
public String getTarget()
protected void setPortData(byte[] data)
throws SocksRequestException
SocksRequestExceptionprotected void setIPv4AddressData(byte[] data)
throws SocksRequestException
SocksRequestExceptionprotected void setHostname(String name)
protected byte[] readPortData()
throws SocksRequestException
SocksRequestExceptionprotected byte[] readIPv4AddressData()
throws SocksRequestException
SocksRequestExceptionprotected byte[] readIPv6AddressData()
throws SocksRequestException
SocksRequestExceptionprotected String readNullTerminatedString() throws SocksRequestException
SocksRequestExceptionprotected int readByte()
throws SocksRequestException
SocksRequestExceptionprotected void readAll(byte[] buffer)
throws SocksRequestException
SocksRequestExceptionprotected void readAll(byte[] buffer,
int offset,
int length)
throws SocksRequestException
SocksRequestExceptionprotected void socketWrite(byte[] buffer)
throws SocksRequestException
SocksRequestExceptionCopyright © 2015. All rights reserved.