netbits.sockets.readStructuredPacket¶
- netbits.sockets.readStructuredPacket(sock: socket, registry: Registry[Type[StructuredPacket]]) StructuredPacket | None[source]¶
Read a structured packet from the socket.
- Parameters:
sock (socket.socket) – The socket to read from.
registry (registry.Registry[Type[StructuredPacket]]) – The registry of structured packet types.
- Returns:
The structured packet read from the socket.
- Return type:
StructuredPacket or None