@ChannelHandler.Sharable public class PacketEncoderHandler extends io.netty.handler.codec.MessageToMessageEncoder<Object>
This class encodes Socket.IO messages they're sent. The structure of a message is as follows:
[message type] ':' [message id ('+')] ':' [message endpoint] (':' [message data])
The message type is a single digit integer. The message id is an incremental integer, required for ACKs (can be ommitted). If the message id is followed by a +, the ACK is not handled by socket.io, but by the user instead. Socket.IO has built-in support for multiple channels of communication (which we call "multiple sockets"). Each socket is identified by an endpoint (can be omitted).
| Constructor and Description |
|---|
PacketEncoderHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
List<Object> out) |
acceptOutboundMessage, writebind, close, connect, deregister, disconnect, flush, readexceptionCaught, handlerAdded, handlerRemoved, isSharableCopyright © 2012–2016. All rights reserved.