Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Is there any way to connect two sockets together?

by Fastolfe (Vicar)
on Jan 11, 2001 at 21:04 UTC ( #51160=note: print w/replies, xml ) Need Help??


in reply to Re: Is there any way to connect two sockets together?
in thread Is there any way to connect two sockets together?

Note that IO::Socket file handles are by default set with 'autoflush' enabled, so it's not necessary to do that here, especially not by using the select/$|=1/select method. We are dealing with objects, you know. :) $client->autoflush(1)

In addition, you might be interested in the 'can_read' method of IO::Select instead of calling select directly. This is a little "friendlier":

my @readable = $read->can_read; foreach $fh (@readable) { ... }

Replies are listed 'Best First'.
Re: Re: Re: Is there any way to connect two sockets together?
by c-era (Curate) on Jan 11, 2001 at 21:06 UTC
    I forgot about the autoflush. As for the can_read method, it dosen't work that great on active perl, but the regular select works fine.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2023-03-22 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?