Telnet client

Discussion in 'Java' started by Jani Jalkala, Dec 15, 2004.

  1. Jani Jalkala

    Jani Jalkala Guest

    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
     
    Jani Jalkala, Dec 15, 2004
    #1
    1. Advertising

  2. Andrew Thompson, Dec 16, 2004
    #2
    1. Advertising

  3. Jani Jalkala

    Jani Guest

    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?
     
    Jani, Dec 16, 2004
    #3
  4. Jani Jalkala

    Esmond Pitt Guest

    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.
     
    Esmond Pitt, Dec 17, 2004
    #4
  5. Jani Jalkala

    Jani Guest

    Thank you! I got it working now.

    > You should use a BufferedInputStream around Socket.getInputStream() and
     
    Jani, Dec 17, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rambo88
    Replies:
    17
    Views:
    18,797
    Andrew Thompson
    Jul 1, 2004
  2. Ted
    Replies:
    4
    Views:
    1,246
    Sudsy
    Sep 19, 2004
  3. Donnal Walter

    using cmd.exe as a telnet client

    Donnal Walter, Dec 3, 2004, in forum: Python
    Replies:
    6
    Views:
    440
    Donnal Walter
    Dec 6, 2004
  4. Jim Isaacson
    Replies:
    5
    Views:
    628
    Default User
    Nov 5, 2004
  5. Carcarius
    Replies:
    0
    Views:
    329
    Carcarius
    Dec 6, 2007
Loading...

Share This Page