in reply to Re^2: chargen program is too slow / IO::Select socket handle outputting timing issue
in thread chargen program is too slow / IO::Select socket handle outputting timing issue
The first two arguments of IO::Select->select are rarely the same, so I'm not sure that's a useful patch. In fact, the first two arguments should be different in your code. (Why are you waiting to write to the listen socket?) It should look more like:
my $rsel = IO::Select->new(); my $wsel = IO::Select->new(); ... for (;;) { my ($rready, $wready) = IO::Select->select($rsel, $wsel); foreach my $rsocket (@$rready) { ... } foreach my $wsocket (@$wready) { ... } }
|
|---|