public class PacketEncoder extends Object
| Constructor and Description |
|---|
PacketEncoder(Configuration configuration,
JsonSupport jsonSupport) |
| Modifier and Type | Method and Description |
|---|---|
io.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) |
JsonSupport |
getJsonSupport() |
static byte[] |
longToBytes(long number) |
static byte[] |
toChars(long i) |
public PacketEncoder(Configuration configuration, JsonSupport jsonSupport)
public JsonSupport getJsonSupport()
public io.netty.buffer.ByteBuf allocateBuffer(io.netty.buffer.ByteBufAllocator allocator)
public void encodeJsonP(Integer jsonpIndex, Queue<Packet> packets, io.netty.buffer.ByteBuf out, io.netty.buffer.ByteBufAllocator allocator, int limit) throws IOException
IOExceptionpublic void encodePackets(Queue<Packet> packets, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, int limit) throws IOException
IOExceptionpublic static byte[] toChars(long i)
public static byte[] longToBytes(long number)
public void encodePacket(Packet packet, io.netty.buffer.ByteBuf buffer, io.netty.buffer.ByteBufAllocator allocator, boolean binary) throws IOException
IOExceptionpublic static int find(io.netty.buffer.ByteBuf buffer,
io.netty.buffer.ByteBuf searchValue)
Copyright © 2012–2021. All rights reserved.