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

Re: getsockaddr() blocks indefinitely?

by jbert (Priest)
on Nov 15, 2007 at 15:50 UTC ( [id://650997]=note: print w/replies, xml ) Need Help??


in reply to getsockname() blocks indefinitely?

I don't see a getsockaddr, Do you mean getsockname? I can't think of a reason for that to block (should just be a call to get some local state from the kernel).

But it's not unusual for code to do a gethostbyaddr after calling getsockname, which would do a name resolution (DNS, but perhaps also WINS etc on Windows). This could block for a while (but not indefinitely i think).

Could it be that? Could you check your name resolution on the box you're on and in particular, can you reverse lookup all your local IPs?

Can you run a network sniffer and see if your box is generating any lookup traffic (DNS, port 53 - not sure about WINS etc).

Replies are listed 'Best First'.
Re^2: getsockaddr() blocks indefinitely?
by BrowserUk (Patriarch) on Nov 15, 2007 at 16:02 UTC
    Do you mean getsockname?

    Indeed I do, thanks. I've spent too long staring at the opening line in getsockname which reads Returns the packed sockaddr address of this end of the SOCKET connection, ... trying to work out what that meant!

    I'm trying to trace the call into the perl sources, and the name resolution thing loooks like a likely candidate. Thanks.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found