MCPcopy Create free account
hub / github.com/actix/examples / stdin_callback

Function stdin_callback

websockets/echo/websocket-client.py:16–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15 # input reader
16 def stdin_callback():
17 line = sys.stdin.buffer.readline().decode('utf-8')
18 if not line:
19 loop.stop()
20 else:
21 ws.send_str(name + ': ' + line)
22 loop.add_reader(sys.stdin.fileno(), stdin_callback)
23
24 async def dispatch():

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected