pyrtma.web_manager.WebSocketHandler

class WebSocketHandler(socket, addr, server)[source]

Bases: StreamRequestHandler

Methods

calculate_response_key

finish

handle

handshake

make_handshake_response

read_bytes

read_http_headers

read_next_message

send_close

Send CLOSE to client

send_message

send_pong

send_text

Important: Fragmented(=continuation) messages are not supported since their usage cases are limited - when we don't know the payload length.

setup

Attributes

disable_nagle_algorithm

rbufsize

timeout

wbufsize

send_close(status=1000, reason=b'')[source]

Send CLOSE to client

Parameters:
send_text(message, opcode=1)[source]

Important: Fragmented(=continuation) messages are not supported since their usage cases are limited - when we don’t know the payload length.