pex.proto.udp.client

Module Contents

class pex.proto.udp.client.UDPClient(host: str, port: int, timeout: int = 10)

Bases: object

Subclass of pex.proto.udp module.

This subclass of pex.proto.udp module represents Python implementation of the UDP client.

send(data: bytes) None

Send data to the socket.

Parameters:

data (bytes) – data to send

Return None:

None

Raises:

RuntimeError – with trailing error message

recv(size: int) bytes

Read data from the socket.

Parameters:

size (int) – size of data

Return bytes:

read data

Raises:

RuntimeError – with trailing error message