xbox.nano.protocol module

exception xbox.nano.protocol.NanoProtocolError

Bases: Exception

class xbox.nano.protocol.NanoProtocol(client, address: str, session_id, tcp_port: int, udp_port: int)

Bases: object

Client sends ChannelClientHandshake with generated connection id Server responds with ChannelServerHandshake with connection id

UDP protocol sends HandShakeUDP 0x1 with connection ID in RTP header

Server sends ChannelCreates and ChannelOpens Client responds with ChannelOpens (copying possible flags)

async start()
async stop()
async connect(timeout=10)
get_channel(channel_class)

Get channel instance by channel class identifier

Parameters

channel_class (ChannelClass) – Enum member of ChannelClass

Returns

Instance of channel

Return type

Channel

channel_control_handshake(connection_id=None)
channel_create(name, flags, channel_id)
channel_open(flags, channel_id)
channel_close(flags, channel_id)
udp_handshake()
exception xbox.nano.protocol.ControlProtocolError

Bases: Exception

class xbox.nano.protocol.ControlProtocol(address: str, port: int, nano: xbox.nano.protocol.NanoProtocol)

Bases: object

BUFFER_SIZE = 4096
async start()
async stop()
async handle(data)
queue(msg)
flush()
send_message(msg)
exception xbox.nano.protocol.StreamerProtocolError

Bases: Exception

class xbox.nano.protocol.StreamerProtocol(nano: xbox.nano.protocol.NanoProtocol)

Bases: object

connection_made(transport)
datagram_received(data, addr)
error_received(exc)
connection_lost(exc)
send_message(msg)