http://www.perlmonks.org?node_id=329494


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.