Im curious if anyone has sucessfully used IO::Select on windows. I am trying to use it in some network code. I have been unable to get it to work. I thought I was doing something wrong since I havent used this module before. After messing with this all day today I got the idea to try it on my linux box, and it works fine. So now Im at a loss about what to do now. Basicly, on my win2k machine the loop immediately exits and the program closes. On my linux box, it loops through excepting keyboard data and quits on typing /quit.
If the module can not be made to work..... Is there another way I can get similar functionality??
Here is sniplet of the code.
sub MainLoop { my $self = shift; my $in = \*STDIN; my $net = $self->{'sock'}; my $sel = IO::Select->new($in); $sel->add($net); my @ready = (); DD: while(@ready = $sel->can_read) { foreach my $fh (@ready) { if ($fh == $in) { my $dat = <$fh>; chomp $dat; last DD if ($dat eq '/quit'); }elsif ($fh == $net) { } } } $self->logoff; close $self->{'sock'}; }
Thanks!
zzSPECTREz
In reply to IO::Select on Windows by zzspectrez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |