>>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
GB> IO::Socket uses non-blocking for doing it's connects so that it can do
GB> a timeout without using alarm(), but it does not really provided
GB> an interface to do non-blocking connects via ->new(). But if
GB> you want to call the individual methods (bind, connect etc) then
GB> you can do it.
having done this in c i should be able to translate it to perl. i just
want to use IO::Socket to hide some of the details so i don't have to go
use perl's socket, connect, etc.
BTW: IO::Socket's pod doesn't seem to mention connect. it that wrong or
just missing?
here is my loose design:
get a plain socket with IO::Socket
make it non-blocking (any object/module ways to do that? or just use
fcntl and O_NONBLOCK?)
do $socket->connect (if that method exists as i ask above)
do write event on the socket and when it is triggered i am connected.
the write event also has a timeout. the connect does not do a timeout
directly or it may conflict with event.pm's timers. anyway i want the
connect/write event to trigger one object with timeout/writable.
where in this would i pass in the host/port address? normally i would do
that in the new, but does the connect method support that?
look good?
while on this note, what is the status of having a separate timeout
method in IO events? joshua like the idea but i havent heard anyhting
about it since i brought it up.
thanx,
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com