Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/topics/keepalive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ measured during the last exchange of Ping and Pong frames::
Alternatively, you can measure the latency at any time by calling
:attr:`~asyncio.connection.Connection.ping` and awaiting its result::

pong_waiter = await websocket.ping()
latency = await pong_waiter
pong_received = await websocket.ping()
latency = await pong_received

Latency between a client and a server may increase for two reasons:

Expand Down
178 changes: 93 additions & 85 deletions src/websockets/asyncio/connection.py

Large diffs are not rendered by default.

151 changes: 75 additions & 76 deletions src/websockets/sync/connection.py

Large diffs are not rendered by default.

Loading