in reply to Re: Check for request from UDP client
in thread Check for request from UDP client

Really, it's that easy to stop blocking? Everything I've read about non-blocking talks about using select.

So I would put this line right after getting the new object?

$sock = IO::Socket::INET->new(etc.); $sock->blocking(0);

Thanks for the help.

jgentry@swcp.com

Replies are listed 'Best First'.
Re^3: Check for request from UDP client
by tadman (Prior) on Jul 05, 2001 at 23:05 UTC
    Yes, you can use select() as well, which is a more traditional way, since with one call you can check on a large number of sockets simultaneously. If you want to use this, which isn't a bad idea, you might as well use IO::Select instead of the regular one, seeing as how you are using IO::Socket. See the documentation page by clicking on that link, as it contains a useful example.

      I only need to check one socket, so I think I'll try the short, simple method you suggested first. Thanks again for the help.

      jgentry@swcp.com