Search the Community
Showing results for tags 'tcpaccept'.
-
TCPStartup() ; Local $nListen = TCPListen('127.0.0.1', 61000) Local $timer, $timerdiff, $nSocket ; Do $timer = TimerInit() $nSocket = TCPAccept($nListen) $timerdiff = TimerDiff($timer) MsgBox(0, '', Round($timerdiff, 1) & ' ms', 2) Until $nSocket > 0 Function: TCPAccept() Affected: All versions from v3.3.10.0 to v3.3.15.0. Problem: Depending on what computer and OS is used, TCPAccept is 7 to 10 times slower than v3.3.8.1. Explanation: Some time ago, I noticed that TCPRecv loops seemed slower than with previous versions. I had no idea what the problem could be, nor did I have the time to trouble-shoot the problem. The loop was working, but not as fast as before. I had been using my own WSA code for TCP, so I wasn't too concerned about it. After some extensive testing, trying to figure out an unrelated issue from one of our members, I discovered that TCPAccept was the problem. The reproducer script will show the difference between v3.3.8.1 and newer versions, starting with v3.3.10.0. My Timer Results using v3.3.8.1: 0.85 to 15.0 ms My Timer Results using newer versions: 102.0 to 110.0 ms Conclusion: This problem may not appear to be a big issue, but when you're transferring data 7 to 10 times slower than normal, it makes a difference. Especially, since typical TCPRecv speed is 10ms and TCPAccept is in the same main loop.