Package crow.game.codec
Interface Context
- All Known Implementing Classes:
HA0Context,LoginContext,NettyWrappedContext,RootContext
public interface Context
Context wraps the calling context when performing packet logic.
It allows packet handlers to query details about the running system that may change based on the given client, the network type, whether we are encoding or decoding the packet.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSource determines where the context was constructed and called into. -
Method Summary
Modifier and TypeMethodDescriptionList<PacketHandler<?>>lookupPacketHandler(int prefix) List<PacketHandler<?>>lookupPacketHandler(Class<?> clz) default booleanintstatic ContextTODO()
-
Method Details
-
supportedProtocolVersion
int supportedProtocolVersion()- Returns:
- the current RO protocol version as an integer.
-
lookupPacketHandler
-
lookupPacketHandler
-
underlyingObject
Object underlyingObject()- Returns:
- the underlying object, usually a Netty connection object.
-
callingSource
Context.Source callingSource()- Returns:
- the location of the codec workflow this context was built in.
-
matchesPacketVersion
-
TODO
- Returns:
- an empty context used for experimentation and stubbing.
-