pex.proto.rtsp.client

Module Contents

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

Bases: object

Subclass of pex.proto.rtsp module.

This subclass of pex.proto.rtsp module represents Python implementation of the RTSP client.

connect() None

Connect to RTSP socket.

Return None:

None

Raises:

RuntimeError – with trailing error message

disconnect() None

Disconnect from RTSP socket.

Return None:

None

Raises:

RuntimeError – with trailing error message

authorize(username: str, password: str) None

Authorize in the RTSP socket.

Parameters:
  • username (str) – RTSP username

  • password (str) – RTSP password

Return None:

None

Raises:

RuntimeError – with trailing error message

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