Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Input of a Data Stream

by gbarr (Monk)
on Oct 05, 2001 at 21:24 UTC ( [id://117049]=note: print w/replies, xml ) Need Help??


in reply to Input of a Data Stream

In order to give a full response we would need to know more. Is the data you are reading line based ? Does the app need to read from more than one connection at a time ?

Depending on what your answers are will change how many short-cuts you can take.

If this is just a simple app that reads a line based datastream from just the one socket then you can do

while(<$clientfd>) { last if /^EOS$/; # process line } close($clientfd);

But if you want to read from more than one socket at a time then you will need to use sysread and select

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-25 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found