Comments on: State of TCP networking in Rebol 3
It would be great to work out the remaining kinks in TCP for Rebol 3.
I'd heard recently about a mysterious TCP bug, so as a test, I wrote basic TCP client server scripts today. They worked pretty well over the local network where thru-put averaged 61 Mbps between two Linux boxes running Rebol 3. While doing that the system monitor on the client (TX) was at 4% of the CPU (although, I think that's the average over all cores.) I did not test it on the Internet. I guess that's next.
You can find the sources here:
Feel free to modify them and send pull requests if you've got some good additions.
These also serve as a basic example if you want to get started on your own networking in Rebol 3.
There were some issues:
- If you close the client socket at random, the server read fails with an error message (code 104), not a close event. It is indeed an error condition, and it should be trappable, so I'm not sure what we really want. Probably the close event is more friendly.
- There's no timeout event, so you have to use the main wait. This should work, but it messes up your code structure because all your event processing is in the awake function. Maybe there's a simple solution floating around, or maybe we have to add timeout events.
The bug is a 9910 error. We are trying to isolate it to a simple example, but it may be useful to make 9910 non-fatal in trying to catch it to see what is happening. |
This is script from Andreas that reproduces the bug which maybe overflowing the event queue and then corrupting the tcp port
The underlying "mysterious TCP bug" has since been fixed and the fixes were merged mainline:
Post a Comment:
You can post a comment here. Keep it on-topic.