()
| 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(): |