Top Description Fields Constructors Methods
io.netty.handler.codec.socksx.v4

public final Class Socks4ServerEncoder

extends MessageToByteEncoder<Socks4CommandResponse>
Class Inheritance
Annotations
@Sharable
Imports
io.netty.buffer.ByteBuf, .ByteBufUtil, io.netty.channel.ChannelHandler.Sharable, .ChannelHandlerContext, io.netty.handler.codec.MessageToByteEncoder, io.netty.util.NetUtil

Encodes a Socks4CommandResponse into a ByteBuf.

Field Summary

Modifier and TypeField and Description
public static final Socks4ServerEncoder
private static final byte[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
encode(ChannelHandlerContext ctx, Socks4CommandResponse
the message to encode
msg
,
ByteBuf
the ByteBuf into which the encoded message will be written
out
)

Implements abstract io.netty.handler.codec.MessageToByteEncoder.encode.

Encode a message into a ByteBuf.
Inherited from io.netty.handler.codec.MessageToByteEncoder:
acceptOutboundMessageallocateBufferisPreferDirectwrite

Field Detail

INSTANCEback to summary
public static final Socks4ServerEncoder INSTANCE
IPv4_HOSTNAME_ZEROEDback to summary
private static final byte[] IPv4_HOSTNAME_ZEROED

Constructor Detail

Socks4ServerEncoderback to summary
private Socks4ServerEncoder()

Method Detail

encodeback to summary
protected void encode(ChannelHandlerContext ctx, Socks4CommandResponse msg, ByteBuf out) throws Exception

Implements abstract io.netty.handler.codec.MessageToByteEncoder.encode.

Doc from io.netty.handler.codec.MessageToByteEncoder.encode.

Encode a message into a ByteBuf. This method will be called for each written message that can be handled by this encoder.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToByteEncoder belongs to

msg:Socks4CommandResponse

the message to encode

out:ByteBuf

the ByteBuf into which the encoded message will be written

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs