readPacketFromStream static method
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);