Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Telnet client

Reply
Thread Tools

Telnet client

 
 
Jani Jalkala
Guest
Posts: n/a
 
      12-15-2004
I'm trying to build a telnet client with Java. I have found full
applications with open source from the web, but I'd like to code my own
thing from scratch so that I can learn from the process instead of copying
code without fully understanding what it does. This link provided some good
information for me:

http://utenti.lycos.it/yanorel6/2/ch31.htm

It works, but the application performs quite slow (makes DSL feel like 2400
modem). So if anyone could point me to the bottleneck, that would be much
appeciated. I'm guessing that it is something in the implementation of
NVTInputStream class, but I don't want to spend too much time investigating
what it could be.

Thanks,
Jani


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      12-16-2004
On Wed, 15 Dec 2004 21:12:59 GMT, Jani Jalkala wrote:

> I'm guessing that it is something in the implementation of
> NVTInputStream class, but I don't want to spend too much time investigating
> what it could be.


If you don't, why should we?

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
 
Jani
Guest
Posts: n/a
 
      12-16-2004
What I was trying to ask was of course that if someone happened to know the
answer right from top of their head, without any closer inspection or
debugging of the code. If you don't know, then you've already spent more
time on this than you should have. Sorry about that.

"Andrew Thompson" <> wrote in message
news:1fqkesuvovdgy$... .
> On Wed, 15 Dec 2004 21:12:59 GMT, Jani Jalkala wrote:
>
> > I'm guessing that it is something in the implementation of
> > NVTInputStream class, but I don't want to spend too much time

investigating
> > what it could be.

>
> If you don't, why should we?



 
Reply With Quote
 
Esmond Pitt
Guest
Posts: n/a
 
      12-17-2004
For telnet I would suggest that you should set the Nagle algorithm off.
You should use a BufferedInputStream around Socket.getInputStream() and
a BufferedOutputStream around Socket.getOutputStream(), flushing the
output whenever you have sent a complete Telnet command or a piece of
user input - try to avoid writing just one character at a time. You
should also use two separate threads for socket input and output.

 
Reply With Quote
 
Jani
Guest
Posts: n/a
 
      12-17-2004
Thank you! I got it working now.

> You should use a BufferedInputStream around Socket.getInputStream() and



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet - attempting to initiate a telnet session within an established telnet session Carcarius Ruby 0 12-06-2007 03:26 AM
Need to talk to a telnet server and send a telnet break Jim Isaacson C Programming 5 11-05-2004 09:17 PM
Java SSH / Telnet client Source Ted Java 4 09-19-2004 03:11 PM
Is there java telnet-client API to connect telelnet server? rambo88 Java 17 07-01-2004 04:01 AM
How can I telnet when I dont have specific access to a telnet client Jack B. Pollack Computer Support 4 07-24-2003 08:58 PM



Advertisments