none
Wierd socket anomalies RRS feed

  • Question

  • Hey all,

    I am currently working on a custom server, providing - between others - support for tcp connections using the Http application protocol. Everything works fine, and I have it implemented both synchronously and asynchronously, and have provided methods to download/upload data directly using the socket .net class as well as the networkstream class. 

    Sometimes, however, when I try connecting to the TCP server socket (on the Http protocol, thanks to chrome's browser) - which is up and running -, no connection request seems to be routed to my socket at the first two or three connection attempts. Thanks to a monitoring function, I could see that even though my browser was stating that it was waiting for the localhost, and therefore trying to connect, the server socket, still operational, would return me FALSE on pending connections, and would therefore not accept the pending connection that never seems to reach it. I therefore have to refresh my browser two or three times for the connection to be established. This seems to happen at random times, with no reasonable explanations...

    For I have IIS installed, I was wondering if the http request could be sometimes and somehow intercepted by the latter, and routed to my software some 20 seconds after...

    Please help, I really cannot figure out why this is happening, my code is straightforward and works perfectly, I just have to face, about like 10% of the time, those weird mishappenings. No exceptions throwns, no errors, the client's connection request will just no reach my server socket...


    • Edited by Chad 333 Sunday, June 15, 2014 12:19 PM
    Sunday, June 15, 2014 12:18 PM

Answers

  • All Browsers use local data temp folders.  Not sure if they are shared between different browsers.  but still the cookies are stored until expired and may  have an effect on the issue.  What port numbers are you using for your local sockets?  A remote server will use 80 or 8080 for most web applications.  A firewall may be blocking or checking data which could slow down or block responses.  You could also have malware slowing down your internet/intranet interfaces.  The IIS software may have higher priority than you service and when the IIS is doing a lot of processing is will slow down your service.  It is hard to say what is the exact cause of your issue.

    jdweng

    Sunday, June 15, 2014 5:09 PM

All replies

  • Probably has something to do with cookies.  The cookie number is being saved in the IE temporary folder.  Maybe the Java on the server is causing the delay.

    jdweng

    Sunday, June 15, 2014 12:46 PM
  • Well, I believe I did not understand what you meant... First, I'm using Chrome or Firefox or Safari or Opera, but NEVER, I say NEVER, IE: don't want to support the only browser which is, overall, the worst pain in the ass of the browser world. Second, and though IIS is installed on my machine, I do not use it for this project: my application is a stand-alone executable, and it does not, in any ways, use and/or rely on java...

    Did you mean that the problem could come from the client browser that I'm using, and possible troubles with cookies? If so, why are my local applications the only ones causing problems, then? As a matter of fact, I never face these problems with any remote site I've connected to... And yeah, this happens only with my http sockets for even my websockets are working with NO problems whatsever. This is the reason why I believe IIS is intefering.


    • Edited by Chad 333 Sunday, June 15, 2014 1:07 PM
    Sunday, June 15, 2014 1:07 PM
  • All Browsers use local data temp folders.  Not sure if they are shared between different browsers.  but still the cookies are stored until expired and may  have an effect on the issue.  What port numbers are you using for your local sockets?  A remote server will use 80 or 8080 for most web applications.  A firewall may be blocking or checking data which could slow down or block responses.  You could also have malware slowing down your internet/intranet interfaces.  The IIS software may have higher priority than you service and when the IIS is doing a lot of processing is will slow down your service.  It is hard to say what is the exact cause of your issue.

    jdweng

    Sunday, June 15, 2014 5:09 PM
  • Do you have enough logging, which definitely proves that your custom server does not receive some of expected requests?

    Maybe also show some details about your custom server and socket listening.


    • Edited by Viorel_MVP Monday, June 23, 2014 4:41 AM spelin'
    Sunday, June 15, 2014 6:30 PM