Many thanks to you, Monks!
After much fiddling with the ideas here, I decided on another way of doing it. Here's what I decided:
I'm using IO::Socket::INET, so my ports are defaulted to non-blocking. Sadly, that means that as soon as I get any connection from the client, I can get an undef on that port during a pause or after input during the next cycle. So that was out.
I then set the port to block, and set the Timeout value, but it wouldn't time out for me at accept. Dunno why that is, I'm on *nix, so it should work. *shrug*
So, I set the thing to block, and after the accept I added:
That way, during any client pause, the connection is still open, so peerhost returns it's IP address. When the connection drops, that value goes undef and I call my exit sub.$test=$data_port->peerhost(); if (not defined $test){close_data_port;}
In reply to Re: Re: Can I timeout an accept call?
by Declarent
in thread Can I timeout an accept call?
by Declarent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |