Debian Codegraph @

testing/web-platform/tests/tools/third_party/websockets/docs/reference/sansio/client.rst

raw
1 Client (`Sans-I/O`_)
2 ====================
3
4 .. _Sans-I/O: https://sans-io.readthedocs.io/
5
6 .. currentmodule:: websockets.client
7
8 .. autoclass:: ClientProtocol(wsuri, origin=None, extensions=None, subprotocols=None, state=State.CONNECTING, max_size=2 ** 20, logger=None)
9
10 .. automethod:: receive_data
11
12 .. automethod:: receive_eof
13
14 .. automethod:: connect
15
16 .. automethod:: send_request
17
18 .. automethod:: send_continuation
19
20 .. automethod:: send_text
21
22 .. automethod:: send_binary
23
24 .. automethod:: send_close
25
26 .. automethod:: send_ping
27
28 .. automethod:: send_pong
29
30 .. automethod:: fail
31
32 .. automethod:: events_received
33
34 .. automethod:: data_to_send
35
36 .. automethod:: close_expected
37
38 WebSocket protocol objects also provide these attributes:
39
40 .. autoattribute:: id
41
42 .. autoattribute:: logger
43
44 .. autoproperty:: state
45
46 The following attributes are available after the opening handshake,
47 once the WebSocket connection is open:
48
49 .. autoattribute:: handshake_exc
50
51 The following attributes are available after the closing handshake,
52 once the WebSocket connection is closed:
53
54 .. autoproperty:: close_code
55
56 .. autoproperty:: close_reason
57
58 .. autoproperty:: close_exc