commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Adding TERMINAL-TYPE option to TelnetClient
Date Mon, 24 Mar 2003 10:43:08 GMT

I added yet another functionality to TelnetClient, which is very handy to debug:
You can spy what's going on in the TelnetClient session by registering to it
an OutputStream. TelnetClient will copy all the session activity on the registered

- TelnetClient: added two new methods (registerSpyStream(), stopSpyStream())
- Telnet: Added new methods to manage the spy stream
- TelneInputStream: calls a Telnet's method to copy the received chars on the
  output stream

- TelnetClientExample3: It is a new example showing the use of registerSpyStream()
  an stopSpyStream(). It opens a telnet connection to a server, then listen to port
  3333. Just connect to port 3333 with an external telnet, then type SPY on the
  TelnetClientExample3 terminal and you will see all the TelnetClient traffic copied
  on the telnet connection to port 3333. UNSPY will stop spying the connection.

I enclose another patch which includes all the preceeding + the new spy stream
functionality (sources + JUnit tests).
Again, sorry for sending so many versions of this patch, I'm just adding the functions
I need one at a time when I have got some free time to do that.
If you ave some comments or need some explanation, please contact me.


View raw message