io.github.kory33.s2mctest.core.connection.protocol

Type members

Classlikes

class PacketIdBindings[BindingTup <: Tuple](bindings: BindingTup)(using val ev: IsMappedBy[CodecBinding][BindingTup])(using x$3: Require[ContainsDistinctT[BindingTup]])

An object that associates packet IDs with corresponding datatypes' codec.

An object that associates packet IDs with corresponding datatypes' codec.

BindingTup is a tuple of CodecBindings that contain no duplicate types. It is also required that bindings should not contain two entries with the same packet ID.

class Protocol[ServerBoundPackets <: Tuple, ClientBoundPackets <: Tuple](val serverBound: PacketIdBindings[Map[ServerBoundPackets, CodecBinding]], val clientBound: PacketIdBindings[Map[ClientBoundPackets, CodecBinding]])

The protocol, between the "client" and "server" of Minecraft, that decides what packet ID is associated to what datatype. This object also describes the way to serialize and deserialize each associated datatype. For more details, see PacketIdBindings.

The protocol, between the "client" and "server" of Minecraft, that decides what packet ID is associated to what datatype. This object also describes the way to serialize and deserialize each associated datatype. For more details, see PacketIdBindings.

Companion
object
object Protocol
Companion
class
case
class ProtocolView[SelfBoundPackets <: Tuple, PeerBoundPackets <: Tuple](selfBound: PacketIdBindings[Map[SelfBoundPackets, CodecBinding]], peerBound: PacketIdBindings[Map[PeerBoundPackets, CodecBinding]])

The symmetric view of the Protocol that has forgotten which side of server or client we are on. These objects have the invert method that allows flipping the sides of protocol definition.

The symmetric view of the Protocol that has forgotten which side of server or client we are on. These objects have the invert method that allows flipping the sides of protocol definition.

Types

type PacketId = Int
type PacketIn[BindingTup <: Tuple] = Union[PacketTupleFor[BindingTup]]
type PacketTupleFor[BindingTup <: Tuple] = InverseMap[BindingTup, CodecBinding]