[cse491] A few notes on the echo servers

C. Titus Brown ctb at msu.edu
Sun Sep 27 15:35:05 PDT 2009


On Sun, Sep 27, 2009 at 09:51:51AM -0400, Joe Amenta wrote:
> The telnet protocol states that telnet delimits lines with "\r\n", so just
> by keyboard input, it would be very difficult if not impossible to send
> "\n.\n" to make sure that ending condition is checked.
> One way to get around this would be to replace all instances of "\r\n" with
> "\n" on the server-side.  Another solution would be to use a program called
> "netcat", which is like telnet but with a few important differences.  One
> difference is that it sends "\n" at the end of lines.
> 
> Netcat is a UNIX utility, but there are ports for POSIX, Darwin, and
> Windows.

Both good points.  Presumably someone using 'print' on their server side
would be able to figure out the \n.\n problem... ;)

--titus



More information about the cse491-fall-2009 mailing list