Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Processing unpredictable, asynchronous input from a Net::Telnet connection

by Hercynium (Hermit)
on Aug 05, 2007 at 00:23 UTC ( [id://630675]=note: print w/replies, xml ) Need Help??


in reply to Re: Processing unpredictable, asynchronous input from a Net::Telnet connection
in thread Processing unpredictable, asynchronous input from a Net::Telnet connection

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.
  • Comment on Re^2: Processing unpredictable, asynchronous input from a Net::Telnet connection

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://630675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-04-23 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found