Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Re: Win32 sockets and disconnects

by HaB (Sexton)
on Dec 13, 2000 at 18:30 UTC ( [id://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.



Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-06-16 06:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.