Interface BasicPacketChannel
-
- All Superinterfaces:
Channel
,PacketRegistry
,TransactionalPacketRegistry
public interface BasicPacketChannel extends Channel, TransactionalPacketRegistry
Represents a basic channel binding that sends and receives packets. Each packet type is assigned to an opcode. This channel is compatible with the forge opcode based packet channels, unlikePacketChannel
.There are a few limitations with using this channel. Request/response packets may only be used during the handshake phase using
handshake()
. Normal packets may only be send during the play phase.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BasicHandshakePacketDispatcher
handshake()
Gets the packet dispatcher which can be used during the handshake phase.PacketDispatcher
play()
Gets the packet dispatcher which can be used during the play phase.-
Methods inherited from interface org.spongepowered.api.network.channel.Channel
key, manager, setExceptionHandler
-
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.TransactionalPacketRegistry
registerTransactional, registerTransactional, transactionalBinding
-
-
-
-
Method Detail
-
handshake
BasicHandshakePacketDispatcher handshake()
Gets the packet dispatcher which can be used during the handshake phase.- Returns:
- The handshake packet dispatcher
-
play
PacketDispatcher play()
Gets the packet dispatcher which can be used during the play phase.- Returns:
- The play packet dispatcher
-
-