[fpc-pascal] Telnet subcommands revisited
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Wed Jan 23 13:35:25 CET 2013
Please could somebody with appropriate privilege reopen
http://bugs.freepascal.org/view.php?id=22032, or tell me to start a new bug.
The patch I supplied added a facility for lTelnet to be able to parse
and respond to telnet subcommands such as $18 which queries the client
terminal type. Unfortunately, what I've done is incomplete since it
relies on (a) the entire subcommand with its parameters being available
before TLTelnetClient.React() is called, and (b) FStack (as referred to
in the new subcommand() procedure) being able to accumulate an arbitrary
number of bytes rather than being limited to 3 (the lControlStack unit).
I'm not sure the best way to progress this, the problem is that an
arbitrary amount of the incoming command etc. is buffered in
TLTelnetClient.OnRe() and TLTelnet.TelnetParse() so it's not possible to
do a read-ahead from deeper down the call stack.
At present the simplest option looks like a way to temporarily "inflate"
the size of the stack in lControlStack, so that in the specific case
where a subcommand is being accumulated it can hold more than three
characters. Any ideas would be appreciated.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list