[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DISC] Escaping #$#



ok; i've seen one strong objection and mostly either silence or an
expression of a desire to have quoting.  so i went ahead and added
it.  it's mostly exactly rog's suggested text, with some padding.  it
should be available outside the firewall shortly, but until then,
here's what the new section says:

<H2>Network Line Translation</H2>
<P><EM><STRONG>Editor's note</STRONG>: This section is the source of
some controversy among the authors of the specification.  In
particular, it is not unanimously agreed that the description of
quoting below is the optimal behaviour.  The authors consider this an
area for further work.</EM>
<P>MCP implementations require a translation layer between their
message-handling system (which processes out-of-band message lines)
and the network to which the system is attached.  The job of this
translation layer is simply to handle the issue of quoting: how is an
in-band line which <EM>looks</EM> like an MCP message (i.e., begins
with the literal string <SAMP>#$#</SAMP>) distinguished from an actual
MCP message?  MCP 2.1 requires that such in-band lines be quoted by
prepending the string <SAMP>#$"</SAMP> to them.  Note that these
messages are <EM>not</EM>, strictly speaking, out-of-band message
lines; they're not properly part of the protocol.  Instead, they're
in-band messages whose format requires that they be distinguished from
real out-of-band message lines.</P>

<P>A received network line that begins with the characters
<SAMP>#$#</SAMP> is translated to an out-of-band (MCP message) line
consisting of exactly the same characters.</P>
<P>A received network line that begins with the characters
<SAMP>#$"</SAMP> must be translated to an in-band line consisting of
the network line with the prefix <SAMP>#$"</SAMP> removed.  This
method is used to quote lines beginning with <SAMP>#$#</SAMP> or
<SAMP>#$"</SAMP>.  For example, the network line:
<PRE>
#$"#$#this isn't: really an: "out-of-band message"
</PRE>
must be translated to:
<PRE>
#$#this isn't: really an: "out-of-band message"
</PRE>
and treated as an in-band line by the implementing MUD or client.
</P>

<P>Any other received network line translates to an in-band line
consisting of exactly the same characters.

<P>Every in-band line to be <EM>sent</EM> must, if it begins with
either the characters <SAMP>#$#</SAMP> or the characters
<SAMP>#$"</SAMP>, be quoted before sending by prepending the string
<SAMP>#$"</SAMP> to the line.</P>

<P>Out-of-band messages and in-band messages which do <EM>not</EM>
begin with the strings mentioned above require no quoting.</P>