Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Problem with SO_REUSEPORT in IO::Socket::INET

by Necos (Friar)
on Apr 14, 2002 at 00:58 UTC ( [id://158874]=note: print w/replies, xml ) Need Help??


in reply to Problem with SO_REUSEPORT in IO::Socket::INET

Another thing about the 'ReusePort' and 'ReuseAddr' that I'm not sure has been hit upon yet is that there is (I only remember this because I read it like 15 minutes ago) is that there is a single parameter called 'Reuse' that will allow your script/program to use the same port/address even if the script/program is stopped.

Here is a snippet from the IO::Socket POD on this machine (Win2k, Perl 5.005_03):

SUB-CLASSES
IO::Socket::INET
'IO::Socket::INET' provides a constructor to create an AF_INET domain socket and some related methods. The constructor can take the following options

...
...
...
...
Reuse -- Set SO_REUSEADDR before binding
Hope this is of some use to you...

Note: One thing you will need to be careful of (this is a general networking practice...) is if anything is running on the same port that your program is running on. If so, you'll have a lot of problems. I don't remember whether or not you even need to have a 'ReusePort' parameter since, if I recall, you can't have multiple services bound to one port anyway (or maybe that comes from my lack of knowledge of sockets in the *nix/*nux domain).

Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com
perl -e "map{print++$_}split//,Mdbnr;"

Replies are listed 'Best First'.
Re: Re: Problem with SO_REUSEPORT in IO::Socket::INET
by Aighearach (Initiate) on Apr 14, 2002 at 04:11 UTC
    Yeah... the "Reuse" param is a deprecated alias for ReuseAddr
    --
    Snazzy tagline here

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found