Comments on: State of TCP networking in Rebol 3
REBOL Technologies

Comments on: 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

Comments:

Joshua Shireman
27-Aug-2013 16:45:57
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.
Graham
3-Sep-2013 15:29:57
This is script from Andreas that reproduces the bug which maybe overflowing the event queue and then corrupting the tcp port

https://gist.github.com/earl/39435a2f120cbbd63673

Andreas
29-May-2014 15:18:23
The underlying "mysterious TCP bug" has since been fixed and the fixes were merged mainline:

https://github.com/rebol/rebol/pull/188

https://github.com/rebol/rebol/pull/161

https://github.com/rebol/rebol/pull/158

Post a Comment:

You can post a comment here. Keep it on-topic.

Name:

Blog id:

CS-0541


Comment:


 Note: HTML tags allowed for: b i u li ol ul font p br pre tt blockquote
 
 

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, spams, personal attacks, politics, religion, etc.

Updated 22-Oct-2017   -   Copyright Carl Sassenrath   -   WWW.REBOL.COM   -   Edit   -   Blogger Source Code