Re: [Circle] [CODE] Help

From: Jack Wilson (
Date: 08/13/96

Sean P. Mountcastle wrote:
> Hi,
>         I need some help with this snippet of code, for some strange
> reason, I cannot get the telnet client into character mode:
> void charmode_on(struct descriptor_data *d)
> {
>    char *on_string[] =
>    {
>       (char) IAC,
>       (char) DONT,
>       (char) TELOPT_LINEMODE,
>       (char) 0,
>    };
>    SEND_TO_Q(on_string, d);
> }
> Where the 'DONT' is I've  tried DO, WILL, WONT, I've also tried to use
> TELOPT_LFLOW, TELOPT_STATUS, TELOPT_NAWS, and a couple of others.

The way it should work and the way it is actually implemented in telnet
clients is a bit different.  :)  To get into character mode send


What this tells the telnet client is that the server "will" echo any
characters typed, thus the client needn't do it locally.  As a side
effect, you're now in character mode.  To get out, send:


telling the client that the server "wont" echo any more characters, so
the client should start echoing them.

It just so happens that the needed routines are already in Circle:
echo_on() and echo_off().  You'll need an additional flag in the
descriptor_data telling comm.c: "even though the echo mode is off,
this is really character mode, so you should parse the characters one
at a time as they come in".

BTW, I did this a few years back.  From experience I can tell you:
Fast typists are going to hate character mode because of the latency.
And if you have any number of players your site administrator is going
to hate character mode because of the huge increase in bandwidth usage.

Might want to just settle for line-at-a-time editors, especially since
most people just edit stuff on their own machine and then paste it into
the editor buffer.

Oh well, let's see your killer editor.  Please tell me you're copying
JOVE/emacs keyboard bindings...

[----- Jack Wilson ------- ----------------]
[--- Home page: ---------------------]
[- PGP fingerprint:  99 C9 B7 A3 C4 72 DD 87  72 CF 67 50 63 48 D0 6D -]
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/07/00 PST