netbits.sockets.sendStructuredPacket¶
- netbits.sockets.sendStructuredPacket(sock: socket, packet: StructuredPacket, registry: Registry[Type[StructuredPacket]])[source]¶
Send a structured packet through the socket.
- Parameters:
sock (socket.socket) – The socket to send through.
packet (StructuredPacket) – The structured packet to send.
registry (registry.Registry[Type[StructuredPacket]]) – The registry of structured packet types.
- Raises:
ValueError – If the packet type is not registered in the registry.