in reply to Re: 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

I'm not sure what you are trying to accomplish with this extra complexity. Just process the ready-to-read-from sockets first if there are any, then process the ready-to-write-to sockets if there are any.

Now I get an un-initialized error on this part in the actual gen_chars() sub : $sock_client_hash{$wrs->fileno}{bytes_recvd}++;
$wrs->send­(chr($cc)) or close_sock­et($wrs); $cc++; $sock_clie­nt_hash{$w­rs->fileno­}{bytes_re­cvd}++;

If you close the socket, then fileno() will return undef. What did you expect?

- tye        

  • Comment on Re^2: chargen program is too slow / IO::Select socket handle outputting timing issue (KISS)
  • Download Code