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

Re^6: Stumped with select->can_read (concat)

by tye (Cardinal)
on Aug 04, 2012 at 16:48 UTC ( #985443=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Stumped with select->can_read (buffered)
in thread Stumped with select->can_read

sysread as big of chunks as you can, then concat everything into a temp buffer

sysread can read onto the end of the buffer, avoiding the need to copy the data again:

sysread( $fh, $buf, 16*1024, length($buf) );

- tye        


Comment on Re^6: Stumped with select->can_read (concat)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-08-28 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (255 votes), past polls