Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Checking whether or not IO::Socket::accept will block

by Vautrin (Hermit)
on Feb 17, 2004 at 01:35 UTC ( #329494=note: print w/replies, xml ) Need Help??


in reply to Re: Checking whether or not IO::Socket::accept will block
in thread Checking whether or not IO::Socket::accept will block

I don't think so. I am not trying to worry about the reading in from the sockets and file handles -- that is what the children is for. What I want is a way to call accept -- i.e. allow a client to connect -- without having accept wait until there is a client to connect. It seems like something that must have been dealt with before, because if accept waits for a client to connect before returning the system is potentially stuck in an infinite loop.

Want to support the EFF and FSF by buying cool stuff? Click here.
  • Comment on Re: Re: Checking whether or not IO::Socket::accept will block

Replies are listed 'Best First'.
Re: Re: Re: Checking whether or not IO::Socket::accept will block
by antirice (Priest) on Feb 17, 2004 at 05:08 UTC

    I think you want to take a look at this.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1

      Thank you++. I hadn't seen select used like that, and didn't know you could check whether or not there was anything to read on the main socket in order to check whether or not you can accept. It actually makes a lot of sense now that I think about it. <grins/>

      Want to support the EFF and FSF by buying cool stuff? Click here.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-05-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (99 votes). Check out past polls.

    Notices?