REBOL Technologies

State of TCP networking in Rebol 3

Carl Sassenrath, CTO
REBOL Technologies
18-Aug-2013 4:12 GMT

Article #0541
Main page || Index || Prior Article [0540] || Next Article [0542] || 3 Comments || Send feedback

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:

https://github.com/rebol/projects/tree/master/tcp/basic

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.

3 Comments

Updated 17-Nov-2024   -   Copyright Carl Sassenrath   -   WWW.REBOL.COM   -   Edit   -   Blogger Source Code