io.github.kory33.s2mctest.core.connection.transport

Type members

Classlikes

trait PacketTransport[F[_]]

The interface providing read/write operations on serialized packet data.

The interface providing read/write operations on serialized packet data.

The minecraft protocol has optional compression and encryption, and this interface is there to abstract away details about how packet data is transmitted between client and server.

case
class ProtocolBasedTransport[F[_], SelfBoundPackets <: Tuple, PeerBoundPackets <: Tuple](transport: PacketTransport[F], protocolView: ProtocolView[SelfBoundPackets, PeerBoundPackets])(using F: Functor[F])

The protocol-aware transport. This class provides two primary operations, ProtocolBasedTransport#nextPacket and ProtocolBasedTransport#writePacket that will proxy read/write requests of packet datatypes to the underlying lower-level PacketTransport.

The protocol-aware transport. This class provides two primary operations, ProtocolBasedTransport#nextPacket and ProtocolBasedTransport#writePacket that will proxy read/write requests of packet datatypes to the underlying lower-level PacketTransport.

Both of these methods are typesafe in a sense that

  • nextPacket will only result in a datatype in SelfBoundPackets
  • writePacket will only accept a datatype in PeerBoundPackets