readPacketFromStream static method

Future<ServerPacket> readPacketFromStream(
  1. Stream<Uint8List> stream
)

Read a single packet from a Stream. This Stream will most likely from a Socket, though any Stream will work. This will read multiple chunks from the Stream, until the initially sent packet size is met.

Implementation

static Future<ServerPacket> readPacketFromStream(Stream<Uint8List> stream) =>
    fromStream(stream);