ProtocolBasedReadTransport

case
class ProtocolBasedReadTransport[F[_], SelfBoundPackets <: Tuple](readTransport: PacketReadTransport[F], selfBoundBindings: PacketIdBindings[SelfBoundPackets])(using F: Functor[F])

The protocol-aware read transport. This class provides a single operation ProtocolBasedWriteTransport#nextPacket that will proxy read requests to the underlying lower-level PacketWriteTransport.

The method nextPacket is typesafe in a sense that it will only result in a datatype present in SelfBoundPackets.

trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def nextPacket: F[ParseResult[Union[SelfBoundPackets]]]

Read next packet from the underlying transport and parse the id-chunk pair so obtained. The result is given as a ParseResult, which may or may not contain successfully parsed packet data.

Read next packet from the underlying transport and parse the id-chunk pair so obtained. The result is given as a ParseResult, which may or may not contain successfully parsed packet data.

This action only maps a result obtained from transport.readOnePacket, so all concurrent specifications (atomicity, cancellability etc.) from that method are inherited.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product