@ChannelHandler.Sharable public class Socks5ClientEncoder extends MessageToByteEncoder<Socks5Message>
Socks5Message编码为ByteBuf 。
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
static Socks5ClientEncoder |
DEFAULT |
| Modifier | Constructor and Description |
|---|---|
protected |
Socks5ClientEncoder()
使用默认值 Socks5AddressEncoder创建一个新实例。
|
|
Socks5ClientEncoder(Socks5AddressEncoder addressEncoder)
用指定的 Socks5AddressEncoder创建一个新的实例。
|
| Modifier and Type | Method and Description |
|---|---|
protected Socks5AddressEncoder |
addressEncoder()
返回此编码器的 Socks5AddressEncoder 。
|
protected void |
encode(ChannelHandlerContext ctx, Socks5Message msg, ByteBuf out)
将消息编码成 ByteBuf 。
|
acceptOutboundMessage, allocateBuffer, isPreferDirect, writebind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAdded, handlerRemovedpublic static final Socks5ClientEncoder DEFAULT
protected Socks5ClientEncoder()
Socks5AddressEncoder创建一个新实例。
public Socks5ClientEncoder(Socks5AddressEncoder addressEncoder)
Socks5AddressEncoder创建一个新实例。
protected final Socks5AddressEncoder addressEncoder()
Socks5AddressEncoder 。
protected void encode(ChannelHandlerContext ctx, Socks5Message msg, ByteBuf out) throws java.lang.Exception
MessageToByteEncoder
ByteBuf 。
这个方法将被编码器处理的每个书面信息调用。
encode在课堂上
MessageToByteEncoder<Socks5Message>
ctx - 这MessageToByteEncoder所属的ChannelHandlerContext
msg - 要编码的消息
out - 将编写消息写入其中的ByteBuf
java.lang.Exception - 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.