public class Socks4LogicHandler extends AbstractSocksLogicHandler
request| 构造器和说明 |
|---|
Socks4LogicHandler(ProxyIoSession proxyIoSession) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
doHandshake(IoFilter.NextFilter nextFilter)
Perform the handshake.
|
protected void |
handleResponse(IoBuffer buf)
Handle a SOCKS4/SOCKS4a response from the proxy server.
|
void |
messageReceived(IoFilter.NextFilter nextFilter,
IoBuffer buf)
Handle incoming data during the handshake process.
|
protected void |
writeRequest(IoFilter.NextFilter nextFilter,
SocksProxyRequest request)
Encode a SOCKS4/SOCKS4a request and writes it to the next filter
so it can be sent to the proxy server.
|
closeSession, closeSession, enqueueWriteRequest, flushPendingWriteRequests, getProxyFilter, getProxyIoSession, getSession, isHandshakeComplete, setHandshakeComplete, writeDatapublic Socks4LogicHandler(ProxyIoSession proxyIoSession)
proxyIoSession - The original sessionAbstractSocksLogicHandler.AbstractSocksLogicHandler(ProxyIoSession)public void doHandshake(IoFilter.NextFilter nextFilter)
nextFilter - the next filterprotected void writeRequest(IoFilter.NextFilter nextFilter, SocksProxyRequest request)
nextFilter - the next filterrequest - the request to send.public void messageReceived(IoFilter.NextFilter nextFilter, IoBuffer buf)
nextFilter - the next filterbuf - the server response data bufferprotected void handleResponse(IoBuffer buf) throws java.lang.Exception
AbstractProxyLogicHandler.setHandshakeComplete()
if access is granted.buf - the buffer holding the server response data.java.lang.Exception - if server response is malformed or if request is rejected
by the proxy server.