Class PacketEncoder
java.lang.Object
com.corundumstudio.socketio.protocol.PacketEncoder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBuf
allocateBuffer
(io.netty.buffer.ByteBufAllocator allocator) void
encodeJsonP
(Integer jsonpIndex, Queue<Packet> packets, io.netty.buffer.ByteBuf out, io.netty.buffer.ByteBufAllocator allocator, int limit) void
encodePacket
(Packet packet, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, boolean binary) void
encodePackets
(Queue<Packet> packets, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, int limit) static int
find
(io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBuf searchValue) static byte[]
longToBytes
(long number) static byte[]
toChars
(long i)
-
Constructor Details
-
PacketEncoder
-
-
Method Details
-
getJsonSupport
-
allocateBuffer
public io.netty.buffer.ByteBuf allocateBuffer(io.netty.buffer.ByteBufAllocator allocator) -
encodeJsonP
public void encodeJsonP(Integer jsonpIndex, Queue<Packet> packets, io.netty.buffer.ByteBuf out, io.netty.buffer.ByteBufAllocator allocator, int limit) throws IOException - Throws:
IOException
-
encodePackets
public void encodePackets(Queue<Packet> packets, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, int limit) throws IOException - Throws:
IOException
-
toChars
public static byte[] toChars(long i) -
longToBytes
public static byte[] longToBytes(long number) -
encodePacket
public void encodePacket(Packet packet, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, boolean binary) throws IOException - Throws:
IOException
-
find
public static int find(io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBuf searchValue)
-