sendPacket

abstract void sendPacket(Packet<? extends Object> packet)

Sends a packet.

Parameters

packet

the packet

abstract void sendPacket(Packet<? extends Object> packet, @Nullable() GenericFutureListener<? extends Future<? extends Object>> callback)

Sends a packet.

Parameters

packet

the packet

callback

an optional callback to execute after the packet is sent, may be {@code null}. The callback may also accept a ChannelFutureListener.

void sendPacket(Identifier channel, PacketByteBuf buf)

Sends a packet to a channel.

Parameters

channel

the id of the channel

buf

the content of the packet

void sendPacket(Identifier channel, PacketByteBuf buf, @Nullable() GenericFutureListener<? extends Future<? extends Object>> callback)

Sends a packet to a channel.

Parameters

channel

the id of the channel

buf

the content of the packet

callback

an optional callback to execute after the packet is sent, may be {@code null}