commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gennaro Leo <gennaro....@ericsson.com>
Subject [net] ETX in Telnet stream and available() method
Date Thu, 23 Jan 2014 10:24:11 GMT
Hi all,
I'm trying to perform a telnet bridge with my Java code.

First I connect to SERVER1 via telnet, then from its terminal I connect to SERVER2 via telnet.

When I want to exit the telnet connection on SERVER2 (the only way is EXIT;) I get the stream
as reported below.

The ETX character causes the InputStream.available() method read until the < prompt and
I can't get the prompt of SERVER1 again.
Does this ETX causes a break in the stream? How can I read until the > prompt?

Thank you
Gennaro


C:\>telnet SERVER1 23

...

C:\WINNT\Profiles\Administrator>telnet SERVER2 8010
Connecting to SERVER2:8010... Connected!
USERCODE: admin
PASSWORD:
DOMAIN:
MA MML Page 1
ETX<exit;
LOGGED OFF
ETX<
Connection to server lost.

C:\WINNT\Profiles\Administrator>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message