Have you ever written your own little/or large TCP Server in Xojo?
…then I need your help!
I have found a bug in the TCPSocket class that makes my/your/everybody’s server vulnerable to DOS attacks: Let’s say, you have written a simple TCP Server and someone connects to it with FIREFOX and presses and holds F5 (reload), then it is absolutely certain, that your server will hang with 100% CPU load after a couple of seconds.
I have described everything and I have written a minimal test server and submitted this issue under #75595.
Please verify this very critical bug on your machine and if you can reproduce this critical bug, please give my issue report a “+1”/thumbs up. Hopefully, the Xojo team will recognize the importance of this issue and fix it soon!
Do you know a way around this problem?
In my opinion, with this critical bug in place, it is not possible to publish any service written in Xojo on the network.
If you remove the parameter (1000) from DoEvents, than it seems to work as expected, at least on macOS. Can’t get beyond 1.5 % CPU usage while pressing F5 quickly.
Instead doing a Write, Flush and Close together, implement the SendComplete event. Then you can just Write and, when the data has been sent, Close the socket, without having to use Flush at all.