Top Description Constructors Methods
io.netty.handler.codec.socks

public Class SocksMessageEncoder

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

Encodes an SocksMessage into a ByteBuf. MessageToByteEncoder implementation. Use this with SocksInitRequest, SocksInitResponse, SocksAuthRequest, SocksAuthResponse, SocksCmdRequest and SocksCmdResponse

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Constructor Detail

SocksMessageEncoderback to summary
public SocksMessageEncoder()

Method Detail

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

the message to encode

out:ByteBuf

the ByteBuf into which the encoded message will be written

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