https://github.com/flightaware/tcl-udp-examples
Demos/examples using UDP from Tcl with Tnm and tcludp
https://github.com/flightaware/tcl-udp-examples
Last synced: 3 months ago
JSON representation
Demos/examples using UDP from Tcl with Tnm and tcludp
- Host: GitHub
- URL: https://github.com/flightaware/tcl-udp-examples
- Owner: flightaware
- Created: 2015-04-29T16:23:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-29T18:54:48.000Z (about 11 years ago)
- Last Synced: 2023-04-18T10:34:09.883Z (about 3 years ago)
- Language: Tcl
- Size: 125 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tcl UDP examples
These examples assume you have scotty installed, for the Tnm examples, and tcludp installed, for the tcludp examples.
We are using scotty from https://github.com/flightaware/scotty
We are using tcludp from https://github.com/mpcjanssen/tcludp
* tcludp-client.tcl - run a client that reads from stdin and sends lines to localhost port 7652 using tcludp
* tnm-client.tcl - run a client that reads from stdin and sends lines to localhost port 7652 using Tnm
* tcludp-server.tcl - run a server using tcludp that reads from port 7652 and emits what it gets to stdout
* tnm-server.tcl - run a server using Tnm for udp that reads from port 7652 and emits what it gets to stdout
### FreeBSD
What we find on FreeBSD is that using either client program, the server program runs "one message behind" at all times, meaning the first message is only "received" by Tcl after the second message has been received, the second message is only received by Tcl once the third message has been sent and so on.
When we change to line buffered, things work better, but we still get a callback every other message with no data (gets returns < 0).
### nc
this is another way to send:
```
nc -u 127.0.0.1 7652
```