Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Re: Win32 sockets and disconnects

by HaB (Sexton)
on Dec 13, 2000 at 18:30 UTC ( #46409=note: print w/ replies, xml ) Need Help??

in reply to Re: Win32 sockets and disconnects
in thread Win32 sockets and disconnects

The reason for the recreation of the socket is that the previous version, which I am being contracted to replace completely, attempted to keep the same socket open forever, which over the internet, is wishful thinking. It could *never* tell if it was disconnected or not, and would therefore never accept a re-connection attempt from a dropped client. In the socket creation routine, I am setting SO_REUSEADDR, so reusing the same address is no problem. Also, the socket creation routine would return error if it couldn't create a new socket, so I'm pretty sure that's all correct.

As far as multiple clients goes, oddly enough, it will not be handling multiple clients. These are set up on a 1 to 1 ratio, clients to servers. I had actually started out with a polling version, because I also was under the impression that it may have to handle multiple clients (even if not now, but perhaps one day), and I was told that would never happen. *shrug*

Thanks a lot for the reply.



Comment on Re: Re: Win32 sockets and disconnects

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://46409]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-11-26 15:48 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls