public final class Socks4ProxyHandler extends ProxyHandler
ChannelHandler.Sharable| Constructor and Description |
|---|
Socks4ProxyHandler(java.net.SocketAddress proxyAddress) |
Socks4ProxyHandler(java.net.SocketAddress proxyAddress, java.lang.String username) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCodec(ChannelHandlerContext ctx)
添加与代理服务器进行通信所需的编解码器处理程序。
|
java.lang.String |
authScheme()
返回正在使用的认证方案的名称。
|
protected boolean |
handleResponse(ChannelHandlerContext ctx, java.lang.Object response)
处理从代理服务器收到的消息。
|
protected java.lang.Object |
newInitialMessage(ChannelHandlerContext ctx)
返回到代理服务器的连接建立后第一次发送的新消息。
|
java.lang.String |
protocol()
返回正在使用的代理协议的名称。
|
protected void |
removeDecoder(ChannelHandlerContext ctx)
|
protected void |
removeEncoder(ChannelHandlerContext ctx)
|
java.lang.String |
username() |
channelActive, channelInactive, channelRead, channelReadComplete, connect, connectFuture, connectTimeoutMillis, destinationAddress, exceptionCaught, exceptionMessage, flush, handlerAdded, isConnected, proxyAddress, sendToProxyServer, setConnectTimeoutMillis, writebind, close, deregister, disconnect, readchannelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerRemovedpublic Socks4ProxyHandler(java.net.SocketAddress proxyAddress)
public Socks4ProxyHandler(java.net.SocketAddress proxyAddress,
java.lang.String username) public java.lang.String protocol()
ProxyHandler
protocol在课堂上
ProxyHandler
public java.lang.String authScheme()
ProxyHandler
authScheme在课堂上
ProxyHandler
public java.lang.String username()
protected void addCodec(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandler
addCodec在课堂上
ProxyHandler
java.lang.Exception
protected void removeEncoder(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandler
removeEncoder在课堂上
ProxyHandler
java.lang.Exception
protected void removeDecoder(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandler
removeDecoder在课堂上
ProxyHandler
java.lang.Exception
protected java.lang.Object newInitialMessage(ChannelHandlerContext ctx) throws java.lang.Exception
ProxyHandler
newInitialMessage在课堂上
ProxyHandler
null如果代理服务器需要发送第一条消息)
java.lang.Exception
protected boolean handleResponse(ChannelHandlerContext ctx, java.lang.Object response) throws java.lang.Exception
ProxyHandler
handleResponse在课程
ProxyHandler
true如果到目的地的连接已建立,
false如果到目的地的连接尚未建立,并且预计将从代理服务器获得更多消息
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.