go ahead... be a heretic | |
PerlMonks |
Re^2: Processing unpredictable, asynchronous input from a Net::Telnet connectionby Hercynium (Hermit) |
on Aug 05, 2007 at 00:23 UTC ( [id://630675]=note: print w/replies, xml ) | Need Help?? |
Some experimentation with different ways of getting the input has shown me that Net::Telnet seems to be able to buffer the data coming in over the socket sufficiently that I haven't lost any in my tests. I guess I just needed someone else to reassure me that it would work. However, I am still curious as to *how* it works... What I've got so far is this: The input is data sent from the remote host and the output is the data my app sends to the remote host. My app uses Net::Telnet to retrieve the input lines and send the output lines. The documentation says that all output is flushed while all input is buffered. What I don't understand is how the buffering happens - is that something a socket does behind-the-scenes? Because if Net::Telnet is doing the buffering I want to understand how the code is executing - I *know* that input is coming in while my app is processing, between calls to Net::Telnet's readline() method. Still, my second shot at this module is shaping up to be much, much better code without the threads.
In Section
Seekers of Perl Wisdom
|
|