Re: [Freeciv-Dev] Optional packets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> What do you think about this:
> Add two packet types, OPTIONAL_REQUEST and OPTIONAL_INFO. First field of
> them would be string, containing id name of real purpose of packet. Both
> client and server would be perfectly ok to ignore them if they would not
> recognized particular request/info.
This sounds good. I was actually considering adding an extention to
the event packet that could contain detail information. For instance,
when a city improvement is built, the E_IMP_BUILD would be sent with
a detail trailier saying that the particular improvement is
B_AQUEDUCT, so the aqueduct sound could be played. I was going to
attach this to the event packet so that the sound would be attached to
the message in the message window like it is now.
I'm not sure whether you're talking about a request/response scenerio;
does the server send out all optional info all the time, or does
OPTIONAL_REQUEST cause the server to start sending out particular
packets, or is OPTIONAL_REQUEST requesting the server to immediately
send out an OPTIONAL_INFO packet with the requested information?
If you're discussing the last case, I have a couple of concerns.
Remember that if the AI's are moving, then the server may not see the
packet for many minutes. I also assume you'll send a magic cookie
with the request, so you can wait for the right packet (since others
may be in the pipe when you send the request). In that case, the
server could respond with something saying that the given request is
not implemented, rather than ignoring it altogether.
Cheers,
joelh
--
Joel Ray Holveck - joelh@xxxxxxx
Fourth law of programming:
Anything that can go wrong wi
sendmail: segmentation violation - core dumped
|
|