Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Answer: Where can I find resources about Socket, IO::Socket, IO::Socket::INET

( #8385=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > Where can I find resources about Socket, IO::Socket, IO::Socket::INET contributed by btrott

That's not what the perlfunc entry for *my* getsockopt says--mine says:
getsockopt SOCKET,LEVEL,OPTNAME
Are you talking about getsockopt or setsockopt? Sounds like the latter. But if you're writing it as getsockopt, that's the problem. :)

If you're using IO:Socket, this is much easier:

my $sock = IO::Socket::INET->new( Listen => 5, LocalAddr => 'localhost', LocalPort => 9000, Proto => 'tcp'); $sock->setopt(SO_SNDTIMEO, 1);
It acts on the SOL_SOCKET level.

In terms of a general resource--you said you've read the man pages. Have you read the man pages for the C functions that all this stuff is based on? Those might help you out. The options for setsockopt/getsockopt are in setsockopt(2).

Comment on Answer: Where can I find resources about Socket, IO::Socket, IO::Socket::INET
Select or Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (21)
As of 2015-07-31 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls