Skip to main content
gamedev.net
🔒 Locked

Strange Socket Errors

Started by fathom88 Oct 6, 2004 at 9:04 AM 1 replies 650+ views
Original Post
fathom88
fathom88
I have a totally strange socket error. On Win 2000, my app communicates with another program on a UNIX machine. Most of the time it works fine. Once in a long while, I message intended for another PC. The connection is made dynamically; meaning it tries to re-connect when the connection is lost. However, all the network names and ports are passed via config file. How can message end up in the wrong place after socket is already bound to a specific host?? Has anyone come across a problem remotely like this?
griffenjam
griffenjam
Are you keeping your socket connected for a long period of time? Once a connection is established the host name information is no longer used and the ip address is used instead. If you are using DHCP on your network is is possible to connect then the client goes down and a new clients gets it's address and the server doesn't realise what has happened. I think this would be more likely for connectionless sockets (like UDP) however I've never been impressed with winsock's error handleing ability and would not be surprised if it failed to notice that a client has been dropped. This may also be a bug in your code. Are you checking to see if your clients are dropping off? Try connecting to the server then pulling the network cord and see what happens. If the client doesn't drop off the server then you have a problem there.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.