File: README.md

package info (click to toggle)
python-tornado 6.2.0-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,396 kB
  • sloc: python: 27,837; javascript: 156; sh: 99; ansic: 58; xml: 49; makefile: 48; sql: 23
file content (30 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TCP echo demo
=============

This demo shows how to use Tornado's asynchronous TCP client and
server by implementing `handle_stream` as a coroutine.

To run the server:

```
$ python server.py
```

The client will send the message given with the `--message` option
(which defaults to "ping"), wait for a response, then quit. To run:

```
$ python client.py --message="your message here"
```

Alternatively, you can interactively send messages to the echo server
with a telnet client. For example:

```
$ telnet localhost 9888
Trying ::1...
Connected to localhost.
Escape character is '^]'.
ping
ping
```