Interface PacketChannel
- All Superinterfaces:
Channel
,PacketDispatcher
,PacketRegistry
,TransactionalPacketDispatcher
,TransactionalPacketRegistry
public interface PacketChannel
extends Channel, TransactionalPacketRegistry, TransactionalPacketDispatcher
Represents an advanced channel binding that sends and receives packets. An
advantage over using a
BasicPacketChannel
is that it also supports
request/response packets.
However this channel is NOT compatible with the forge opcode based packet
channels. If you want to remain compatible, use BasicPacketChannel
instead.
The channel registration of this channel is also synced between the client
and server during both the handshake and play phases. Because of this,
PacketDispatcher.isSupportedBy(EngineConnection)
may be called to check whether a
connection the packet channel supports.
-
Method Summary
Methods inherited from interface org.spongepowered.api.network.channel.Channel
key, manager, setExceptionHandler
Methods inherited from interface org.spongepowered.api.network.channel.packet.PacketDispatcher
isSupportedBy, sendTo, sendTo, sendToAllPlayers, sendToAllPlayersIn, sendToServer
Methods inherited from interface org.spongepowered.api.network.channel.packet.PacketRegistry
binding, binding, bindings, register
Methods inherited from interface org.spongepowered.api.network.channel.packet.TransactionalPacketDispatcher
sendTo, sendTo, sendToServer
Methods inherited from interface org.spongepowered.api.network.channel.packet.TransactionalPacketRegistry
registerTransactional, registerTransactional, transactionalBinding