Winsocket clients disconnects randomly RRS feed

  • Question

  • Hi all,


    I have impleted Client/Server application using Asynchoronous TCP streems. To test that the Server's stability I create a sample application which can communicate with the server. It creates 200 ports throug which it connects with a single port of server.


    The problem is that the application worked fine but the logs indicates that some of the clients are disconnected with the errors WSAError 10053 where as in the server logs I fond error WSAError 10054: "An existing connection was forcibly closed by the remote host".


    To check this either it is the fault of my Winsocket implimentation or some network issue I run the test again with the network sniffer software Eathereal. I found [Out-Of-Order] frame messege and then [TCP Previous Segment Lost] with RST in the Eathereal dumps between the same time period when 10053 error is logged in my application logs. The connection for the client elasped just for appr. 2.5 minutes.


    On searching the internet about it I found a site  http://tangentsoft.net/wskfaq/articles/io-strategies.html (Heuristic 5: To support a moderate number of connections, consider asynchronous sockets and event objects.), which described that Asynchoronous sockets supports only moderate no. of connections — up to 100 or so — if we need more connections then we have to implement Overlapped I/O strategy.


    Can anyone guide me on this, which strategy is best or anyone who implemented Asynchoronous sockets with more than 100 connections and satisfied with the server performance. Or someone who has faced simmilier kind of problems and resolve the issue.



    Thursday, November 1, 2007 10:14 AM