Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bedroombuilds/python2rust
/ stdin_to_ws
Function
stdin_to_ws
23_websockets_client/python/ws_client.py:11–16 ·
view source on GitHub ↗
(websocket)
Source
from the content-addressed store, hash-verified
9
10
11
async
def
stdin_to_ws(websocket):
12
while
True:
13
line = await read_stdin_line()
14
await websocket.send(line.strip())
15
if
line.strip() ==
"/exit"
:
16
break
17
18
19
async
def
ws_next(websocket):
Callers
1
main
Function · 0.85
Calls
2
read_stdin_line
Function · 0.85
send
Method · 0.80
Tested by
no test coverage detected