As I understand it, timeout would apply to the connection handshake, not waiting for a poll or data message. Also, I checked the
source for
IO::Socket::INET, and the timeout function is commented out. You could still try adding a timeout to the constructor, but I don't know if that would work or not. I'd go with
jethro's advice and use
IO::Socket::INET::Daemon.
It's the simplest way that I know of.