An example chat app using tinclib
Install the CE C toolchain (v15.0) and put CEdev/bin on your PATH.
tinclib (v0.6.0) and titrmlib (v0.4.2) are pinned git submodules under lib/. The protocol is nested inside tinclib:
git clone --recursive https://github.com/gavinhsmith/tinclib-chat.git
# or, in an existing clone:
git submodule update --init --recursivemakeProduces bin/TINCCHAT.8xp. The calculator needs the
CE C libraries
(usbdrvce, srldrvce, fileioc, graphx, keypadc) and TINCLIBC for Wi-Fi setup.
node server/server.js # PORT=3000 by default; Node 18+, no dependencies
node server/test.js # API checkOpen http://<your-pc>:3000 on a phone for the web client. On the calculator,
enter that same address as host:port (not localhost; the board makes the
request).
API (plain text, so the calculator doesn't parse JSON):
GET /messages?after=ID: oneid<TAB>name<TAB>textline per newer messagePOST /messages: bodyname<LF>text(name up to 16, text up to 200 printable ASCII characters)
The server keeps the last 100 messages in memory.
Enter the server (host:port, e.g. 192.168.1.5:3000), then your name, then
type messages and press [enter] to send. The server is saved in the TCHATSRV
appvar and filled in next time.
[clear] empties the field, and on an empty field quits.