StanChart
asked on
Delay when connecting to another PC using WinSock
Hi,
I have an application that allows users to communicate with each other. I use WinSock for this communication. We've recently been upgraded to WinXP and I've been getting complaints that for some users, they can send data to another user on the network instantly, but for other users, it takes about 30 seconds to connect. The application is not really processing anything at this point. It just hangs for 30 seconds.
Anyone know of any local network settings that would cause this delay?
I don't think this is a coding issue, more like a setting on the PC or configuration of the network adapter on that PC.
Thanks
I have an application that allows users to communicate with each other. I use WinSock for this communication. We've recently been upgraded to WinXP and I've been getting complaints that for some users, they can send data to another user on the network instantly, but for other users, it takes about 30 seconds to connect. The application is not really processing anything at this point. It just hangs for 30 seconds.
Anyone know of any local network settings that would cause this delay?
I don't think this is a coding issue, more like a setting on the PC or configuration of the network adapter on that PC.
Thanks
The recipient. Is it always either quick or slow? (I'm thinking some setting on the computer being connected to - security / firewall settings of Win XP)
ASKER
I was just messing around with this a bit more. I tried to send him data and it took about 30 seconds to send it from my PC (I can send the same data to a PC right next to him instantly). My application sends back acknowledgements once it receives data and it took about the same time to send the ack from his PC to mine.
My application is listed in the exceptions tab of the windows firewall on both machines.
Do you think comparing an ipconfig /all report from both PC's would tell me anything? It gives WINS and DNS server info which in this case is irrelevant since I have the IP right?
Thanks
My application is listed in the exceptions tab of the windows firewall on both machines.
Do you think comparing an ipconfig /all report from both PC's would tell me anything? It gives WINS and DNS server info which in this case is irrelevant since I have the IP right?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
X -> A takes 30 secs but Y -> A takes zero
How does the ipconfig /all for each of the three PC's compare? Anything odd? At a guess Y and A should be very similar but if X has a difference not shared by Y and A...
Have you tried pinging the IP adress of X and Y from A ? (ping /? for help if you haven't used it before)
Have you tried pinging the IP adress of X and Y from A ? (ping /? for help if you haven't used it before)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think it might be a security issue because pinging is very quick. How can I be sure?
If pinging is quick that seems to imply no network bottleneck.
Did you try Dans suggestion of having the same user logged onto A and X and see if that improves the performance?
I'd still check the (windows XP) firewall settings on X and Y to see if there is any difference.
Did you try Dans suggestion of having the same user logged onto A and X and see if that improves the performance?
I'd still check the (windows XP) firewall settings on X and Y to see if there is any difference.
ASKER
I managed to debug it and the function that causes the delay is gethostbyaddr().
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
split
I entered extremely late in this question (was one of the first questions I participated in), it was pretty abandoned before I got here, so am happy to forgo points for a split with the others who were contributing to a "live" question
Steve
Steve
I suggested split because there is good advice on how to eliminate possibilities (which helped identify the problem?) as well as the explaination.
Haven't we done this already?
Cheers
Steve
Cheers
Steve
It's an automated request from Dan (some other cleanup volunteers use this approach as well), it spams questions that are 'flagged' as abandoned. There have been a number of discussions as to whether it is a good approach or not.