Thread: readline() function from UNP book and syncterm

  1. #1
    Registered User
    Join Date
    Jan 2015
    Posts
    15

    readline() function from UNP book and syncterm

    I'm writting a program that uses the readline() function that comes in the Unix Network Programming book, when I use telnet to connect to my server the function reads the input perfectly displaying the username as the user types it in. However, when using a telnet client called syncterm it accepts the user input but does *not* echo it on the screen and I can't figure out why. Can someone help?

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    This is probably not actually a C question. I would guess this has more to do with the configuration of syncterm than anything. One way to help verify is to open a terminal on the server (or ssh to it), and try your program by connecting to localhost (instead of using a different computer and telnet'ing to the IP adress)? If readline works that way, then it's almost certainly a syncterm config issue.

  3. #3
    Registered User
    Join Date
    Jan 2015
    Posts
    15
    Thanks for the reply, I'm actually writting a BBS program like the ones written in the 1990's. Do you suggest I just stick to one client like plain old linux telnet to test all of my work? Rather than worrying with different problems/settings using other clients?

  4. #4
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Note, I've never written a BBS, and it's been years since I mucked with telnet stuff, so I can't offer much specific, detailed advice, and you should take the following with a grain of salt.

    If you expect all kinds of people you don't know to use your BBS, then it should work with as many clients as is possible. If it will be used by just you and some close friends, you only need to worry about supporting a few. Note, however, that telnet clients are pretty "dumb" -- I don't think it's an issue of you supporting a client or not the same way web apps have to worry about supporting different browswers, so much as it is an issue of using the right settings/configuration for syncterm or other clients (e.g. VT100 vs. ANSI terminal emulation, etc) to make it work.

    When you develop your connection layer, you should test it with as many clients as possible/practical. For testing the BBS functionality itself (posting, etc), I would just use one client to eliminate extra variables. Heck, most of what I write would have lots of unit tests that wouldn't even need a telnet connection to verify it works correctly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cannot open include file: 'readline/readline.h'
    By arupsarkar in forum C++ Programming
    Replies: 2
    Last Post: 06-25-2010, 11:07 AM
  2. HELP with READLINE.H
    By HIT_Braga in forum C Programming
    Replies: 10
    Last Post: 04-01-2010, 11:56 AM
  3. ReadLine()...refreshers???
    By verbity in forum C++ Programming
    Replies: 2
    Last Post: 12-24-2008, 01:09 PM
  4. change readline prompt
    By cstudent in forum C Programming
    Replies: 1
    Last Post: 04-19-2008, 10:00 AM
  5. ReadLine to int
    By DaveHope in forum C# Programming
    Replies: 2
    Last Post: 01-27-2006, 10:19 AM