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

public final Class Socks4ClientEncoder

extends MessageToByteEncoder<Socks4CommandRequest>
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 Socks4CommandRequest into a ByteBuf.

Field Summary

Modifier and TypeField and Description
public static final Socks4ClientEncoder
INSTANCE

The singleton instance of Socks4ClientEncoder

private static final byte[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
encode(ChannelHandlerContext ctx, Socks4CommandRequest
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 Socks4ClientEncoder INSTANCE

The singleton instance of Socks4ClientEncoder

IPv4_DOMAIN_MARKERback to summary
private static final byte[] IPv4_DOMAIN_MARKER

Constructor Detail

Socks4ClientEncoderback to summary
private Socks4ClientEncoder()

Method Detail

encodeback to summary
protected void encode(ChannelHandlerContext ctx, Socks4CommandRequest 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:Socks4CommandRequest

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