Anders Gidenstam wrote:

> If both of your computers have the same architecture, run similar 
> operating systems and both programs are compiled with the same compiler 
> (and same version) then one can be reasonably sure that just sending the 
> in-memory representation of a struct between the computers will succeed.
> 
> However, for a multiplatform application like FlightGear one has to do 
> something better. That is, to define exactly how the sent messages should 
> be formated (i.e. their binary representation) and ensure that this can be 
> encoded/decoded on every platform. So, yes you have to use htonf, etc :)

I don't have a solution at hand, still I'd like to point to a place in
FlightGear where this stuff "simply works": The current multiplayer
network interface allows to set IRIX/N32 against Linux/AMD64 and
they both communicate nicely to each other.
This setup includes different word-size, different byte order and
different compiler. The guys who have designed this interface
definitely did an excellent job,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to