pybotters.ClientWebSocketResponse

class pybotters.ClientWebSocketResponse(*args, **kwargs)

Class for handling client-side websockets.

This class is a subclass of aiohttp.ClientWebSocketResponse.

Methods

__init__(*args, **kwargs)

close(*[, code, message])

exception()

get_extra_info(name[, default])

extra info from connection transport

ping([message])

pong([message])

receive([timeout])

receive_bytes(*[, timeout])

receive_json(*[, loads, timeout])

receive_str(*[, timeout])

send_bytes(data[, compress])

send_frame(message, opcode[, compress])

Send a frame over the websocket.

send_json(*args, **kwargs)

Send data to peer as JSON string.

send_str(*args, **kwargs)

Send data to peer as aiohttp.WSMsgType.TEXT message.

Attributes

client_notakeover

close_code

closed

compress

protocol

async send_json(*args, **kwargs) None

Send data to peer as JSON string.

async send_str(*args, **kwargs) None

Send data to peer as aiohttp.WSMsgType.TEXT message.