Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: how to set socket recv timeout in architecture independent manner?

by saurabh.hirani (Beadle)
on May 06, 2009 at 06:18 UTC ( [id://762173]=note: print w/replies, xml ) Need Help??


in reply to Re^3: how to set socket recv timeout in architecture independent manner?
in thread how to set socket recv timeout in architecture independent manner?

Are you sure that works on all platforms?

I don't know. I tried looking it up but could not find any pointers on it being architecture dependent. But to be sure, I can use a non blocking recv() instead of sysread() because the only time I would get to do the read operation (be it through recv() or sysread()) would be when select has given me something to read. That way my recv() wouldn't block. Is sysread architecture dependent?

And while I was looking through the monastery I found this interesting post about sysread - sysread and syswrite in tcp sockets - which says sysread attempts to read the no. of bytes it was told to.

Update: Read the recv function from perldoc - it exhibits similar behaviour - it too attempts to read the no. of bytes it was told to.

  • Comment on Re^4: how to set socket recv timeout in architecture independent manner?

Log In?
Username:
Password:

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

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

    No recent polls found