From ... From: Erik Naggum Subject: Re: Lisp-based protocols
[was Re: OS wars and Lisp] Date: 1998/12/17 Message-ID: <>#1/1
X-Deja-AN: 423411625 References: <> <> <> <> mail-copies-to:
never Organization: Naggum Software; +47 8800 8879; Newsgroups:
comp.lang.lisp * (Paolo Amoroso) | If I get things right, you
designed a--network?--protocol whose commands | can be parsed
with READ. yes. for two reasons: Common Lisp already has a well-
defined syntax for all the object types we need, and the syntax
we use is fairly trivial to generate and parse for non-Lisp
programs, too. | What are the possible strategies for executing
or serving incoming | commands/requests with such a protocol?
two points: I don't call READ on the stream itself. I
implemented a stream with memory, so I set the stream's mark,
eat characters until I see a newline, call READ-FROM-STRING on
the STREAM-SUBSTRING, and if it barfs on end of file, I set up a
timeout and eat characters until the next newline comes along.
the timeout is cancelled and t