Debian Codegraph @

docs/reference/asyncio/client.rst

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