Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: About packet transmission
Home

[Freeciv-Dev] Re: About packet transmission

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Guillermo L&oacute;pez Alejos" <100030179@xxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: About packet transmission
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Tue, 15 Apr 2003 20:05:30 +0200

On Tue, Apr 15, 2003 at 12:12:43PM +0200, Guillermo L&oacute;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!"



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