Simple interactive TCP test server for exercising NetBurner TCP client examples
(e.g. examples/TCP/NoBlockConnectTest).
On each incoming connection it:
* immediately sends a greeting line,
* optionally sends a "server tick N" line every 2 seconds (--ticks), and
* prints everything it receives from the client.
Anything you TYPE in this server's window is forwarded to the connected
client(s), so you can interactively send data to the device. On Windows each
keystroke is sent as you type it; on other platforms input is line-buffered
(sent when you press Enter).
This lets you verify BOTH directions of a NetBurner TCP client:
* receive -- the greeting, ticks, and anything you type here should appear
on the device's console,
* transmit -- whatever the device sends (typed characters, periodic
heartbeats, etc.) is printed here.
Usage:
python tcp_test_server.py [port] [--ticks]
port TCP port to listen on (default 32001).
--ticks Also auto-send a "server tick N" line every 2 seconds.
Point the NetBurner example at this PC's IP address and the chosen port.
Press Ctrl-C to stop the server.