Questions about telnet:

David Barr sisley at milton.u.washington.edu
Sat Mar 9 06:53:18 AEST 1991


        I need some help getting a program of mine to work.  The
program is a BBS server.  There is no client program, people can
connect to it using the telnet program.  One of the only problems that
I have is that I cannot figure out how to determine the status of the
telnet program which is accessing the BBS.  I can't tell whether it is
in line mode or character mode or echo mode, and I don't know how to
switch the modes.  I figured out that when the program is in character
mode, a carriage return will send a CR.  In line mode, the return key
sends a CR-LF.  So to read a line, I just keep reading from the socket
until I get a CR.  Then I try to read one more character, and I know
which mode I am in by whether or not the character is a LF.  I find
this solution to be inadequate, though, and I'd like to be able to
switch from line mode into character mode and be able to turn the
echoing on and off.
        Is anyone familiar with the solution to my problem?  I've
already looked over the source code to telnet, but it wasn't helpful.
Please direct any replies to this message through e-mail to:

David Barr
sisley at u.washington.edu



More information about the Comp.unix.questions mailing list