Login  
Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: Accept event too slow?
Kishor

From: Pleasanton, CA USA
Posts: 1
Member Since: 09/02/03
posted September 2, 2003 9:59 PM

Hi. I'm having a problem using the Daemon control from within VB, dealing with many TCP connections at one time. If I create a daemon to listen, then in another application create, say, 100 TCP connections in a tight For loop, the daemon will process maybe 30 or 40 of them, depending on how much processing I do from within the Accept event. If I just perform an Accept method call on each Accept event (effectively throwing away the socket), I can process maybe about 90. The point is that the processing of the daemon's Accept event in the control itself seems to take too long; it won't catch all connection requests. On the client end (the test program that is creating the TCP sockets), all sockets get a "connecting" event, but none of them ever connect.

Now, on the client end, if I put a DoEvents from within the creation loop, everything works fine. This is telling me that the time delay used to process the DoEvents is enough that the daemon server is able to process all of the connection requests. If I remove the DoEvents, again, the server will only see maybe 40 or so connection requests and the client will never see any of the sockets connect.

I know that I'm pounding the daemon a lot harder than it probably have to deal with in real life, but there just may be conditions when I get multiple connection requests at the same time. And apparently, the Accept event gets missed on some of those attempts and the socket never fully connects. Incidentally, I tried doing this same test using a trial version of the Server control with the same results; maybe 30 or 40 sockets connected out of the hundred connection attempts.

Any suggestions?

Kishor
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted September 2, 2003 10:20 PM

I believe the limitation is actually occuring at the winsock level before it even gets into our code.

Try doing the same thing to IIS and I expect you will see similar results.

Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX