I'm using IO::Socket right now to do some non-blocking network IO for a graphical application. IO::Socket has a blocking() method that purports to toggle blocking mode. It seems to work for reading and writing, but its connect() method--which gets called when you do IO::Socket::INET->new()--does not. First it calls gethostbyname(), which blocks, then it blocks using IO::Select to timeout the connect call. I don't want to rewrite the whole thing to use POE. Is there any way to do a non-blocking connect and gethostbyname() using IO::Socket? If not, what would be the least obtrusive alternatives?
In reply to Non-blocking connect() and gethostbyname()? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |