Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Server from Client
Home

[Freeciv-Dev] Re: Server from Client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Cc: Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Server from Client
From: Reinier Post <rp@xxxxxxxxxx>
Date: Fri, 28 Dec 2001 22:32:22 +0100

On Fri, Dec 28, 2001 at 01:00:47AM -0500, Daniel L Speyer wrote:

> > > 3) The third way is to use the server command language: /show <var> or 
> > > similar.
> > > Extend the language as necessary.  This method has already been discussed.
> > > However, we only discussed the language to use for the command, not the
> > > language of the command results.  At the moment, there is no restriction
> > > on the form of the results, because they are intended for human
> > > consumption; the same problem as with method #2.
> > 
> > But Per's rfcstyle solves this problem.  So this seems to be the best way
> > for the moment.
> 
> Unfortunately, it doesn't.  An extended version of it might.

Yes, that's what I meant.
 
> I recently tried it for checking when a user had connected, but it was all
> the same '012' as tons of other messages.  I haven't looked at what would
> be needed to expand rfcstyle to what's needed.

It doesn't address the grammar problem: responses have to be formulated
according to a certain languyage.  A list of 3-digit codes isn't enough.

> What's needed is really something of a mess.  As I see it, it is nessesary
> to use C's string handling and raw unix io to both find the reply to our
> question (with potentially anything having been printed since we
> asked) and then to parse it in spite of numerous free-form strings.

No, why?

String handling isn't any harder than we discussed for the /set command.
You need a "RFC" code for "this is an attribute/value pair" that
will be used on /show results, and posssibly a separate "this is
an attribute/value pair modified on your request" for a /set result.

> I'm
> starting to seriously think that every query should have a unique flag
> that the server echos back with the answer.  Does anybody have experience
> with this?

It is not necessary to use explicit queries, but if you do, they are
guaranteed to be answered in sequence.

-- 
Reinier


[Prev in Thread] Current Thread [Next in Thread]