in reply to how to set socket recv timeout in architecture independent manner?

Don't do it by hand. That's your best bet. Try something like POE or Net::Server. That's not directly answering your question, but it probably addresses your application as a whole. There are actually a lot of really good choices for handling sockets for you and writing it yourself usually causes more headaches than it's worth.

-Paul

  • Comment on Re: how to set socket recv timeout in architecture independent manner?

Replies are listed 'Best First'.
Re^2: how to set socket recv timeout in architecture independent manner?
by saurabh.hirani (Beadle) on May 05, 2009 at 14:11 UTC
    Thanks for the pointers. I will check them out.
Re^2: how to set socket recv timeout in architecture independent manner?
by saurabh.hirani (Beadle) on May 05, 2009 at 14:19 UTC

    Net::Server or POE look like great tools but they would be an overkill for such a small operation. From what I saw, they might be useful for building a more complex app or a generic base. But for a listen-reply server IO::Socket::INET gives all that is needed, which is not much - send and recv.

    Also there are a many other programs of mine which need to have this feature, all of which are already using IO::Socket::INET.

      overkill? Maybe using a computer is overkill :D