<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
Neil W. Van Dyke wrote:<br>
<pre wrap=""> For list-related administrative tasks:
<a class="moz-txt-link-freetext" href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a>
Chris <a class="moz-txt-link-rfc2396E" href="mailto:email@example.com"><firstname.lastname@example.org></a> writes at 12:13 04-Jun-2003 +0200:
<pre wrap="">I just want to know if a client telnet made in scheme allready exist and
One might exist (I don't know), but writing your own is a really good
<pre wrap="">and it's send me nothing back but i see the connexion opened in the telnetd
log. Am I missing something ?
Perhaps the Telnet server is not sending a full line; for example, maybe
it's just sending "Password: " without a newline sequence. Or maybe
it's using a nonstandard newline convention, like CR (PLT's "read-line"
can be made to handle this, but there's a better way).
Instead of using "read-line", you probably want your code to read single
characters or blocks of characters, rather than waiting for the server
to send a newline. You will need this for other parts of the protocol
anyway. Here's a simple variation on the code you posted:
(display "*DEBUG* Connecting...\n")
(define-values (p-in p-out) (tcp-connect "host" 23))
(display "*DEBUG* Connected.\n")
(let loop ()
(display "*DEBUG* Waiting for character...\n")
(let ((c (read-char p-in)))
(printf "*DEBUG* Read character: ~S\n" c)
If this code doesn't read any characters from your Telnet server, then
it could be waiting for the client to send one or more newlines or it
could be waiting for the client to initiate a cryptographic
authentication. Don't think too hard about "*DEBUG*" messages that
aren't appearing, since they might be stuck in unflushed I/O buffers.
Try running a protocol sniffer or packet analyzer, like the free
Ethereal, while you connect to your Telnet server with your system's
Telnet client, to see how it works.
Once you can read and write single characters with your Telnet server,
take a look at the PLT procedures "read-string-avail!/enable-break" and
"write-string-avail/enable-break", and "object-wait-multiple" for how to
do this robustly and more efficiently.
Searching for "telnet" from <a class="moz-txt-link-rfc2396E" href="http://www.rfc-editor.org/rfcsearch.html">"http://www.rfc-editor.org/rfcsearch.html"</a>
yields over 100 documents, most of which are not relevant to you. RFC
318 (<a class="moz-txt-link-rfc2396E" href="ftp://ftp.rfc-editor.org/in-notes/rfc318.txt">"ftp://ftp.rfc-editor.org/in-notes/rfc318.txt"</a>) might be a good
I once wrote me a little telnet client.<br>
If you want it, there's a file attached.<br>
By the way, if anyone can figure out why this programs slows down the
more you use it, I'd appreciate it.<br>
Katsmall T. Wise, Esquire.<br>