[Freeciv-Dev] Re: About packet transmission
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Apr 15, 2003 at 12:12:43PM +0200, Guillermo López Alejos wrote:
> Hi,
>
> I'm trying to understand the packet traffic process between clients and
> the server. I've seen units packets.h and packets.c but they aren't
> clear enough for me.
>
> Could anyone tell me the detailed process?, specially the moment when
> the receive_* functions are called, and what the receiving machine is
> doing in that moment.
The receive_* functions do some kind of
unmarshaling/unserialization. I.e. they read bytes of a byte stream
and interpret them as a 16bit unsigned int for example. Or a
string. Or an event type. Each receive_* function mallocs a struct,
fills the from the byte stream gather values into the struct and
returns this struct.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Two OS engineers facing a petri net chart:
"dead lock in four moves!"
|
|