Debian Codegraph @

docs/reference/sync/client.rst

raw
1 Client (:mod:`threading`)
2 =========================
3
4 .. automodule:: websockets.sync.client
5
6 Opening a connection
7 --------------------
8
9 .. autofunction:: connect
10
11 .. autofunction:: reconnect
12
13 .. autofunction:: unix_connect
14
15 .. autofunction:: unix_reconnect
16
17 Using a connection
18 ------------------
19
20 .. autoclass:: ClientConnection
21
22 .. automethod:: __iter__
23
24 .. automethod:: recv
25
26 .. automethod:: recv_streaming
27
28 .. automethod:: send
29
30 .. automethod:: close
31
32 .. automethod:: ping
33
34 .. automethod:: pong
35
36 WebSocket connection objects also provide these attributes:
37
38 .. autoattribute:: id
39
40 .. autoattribute:: logger
41
42 .. autoproperty:: local_address
43
44 .. autoproperty:: remote_address
45
46 .. autoattribute:: latency
47
48 .. autoproperty:: state
49
50 The following attributes are available after the opening handshake,
51 once the WebSocket connection is open:
52
53 .. autoattribute:: request
54
55 .. autoattribute:: response
56
57 .. autoproperty:: subprotocol
58
59 The following attributes are available after the closing handshake,
60 once the WebSocket connection is closed:
61
62 .. autoproperty:: close_code
63
64 .. autoproperty:: close_reason