John Wojnaroski wrote:
 > Bottom line: trying to run fgfs and opengc across the network with
 > different platforms (in this case linux and cygwin) results in each
 > side having a different value for the class in raw_ctrls.hxx and the
 > socket read operations fail.
 >
 > I think the problem is especially troublesome when ints, bools, and
 > floats are inside variables bounded by double types. It looks like it
 > really gets messy trying to line up the various types so both sides
 > see the same data boundaries.

What you're trying to do won't work.  It might work, if the
architectures and compilers on both sides of the wire happen to agree.
But in the general case, it just won't work.  Even if the sizes and
layouts happen to agree, the byte ordering might not.  You can't do
network I/O by dumping memory to a socket; it won't work. :)

Write up a wire protocol specification as your basis, and implement
that portably.  It's really your only choice.  And it's not very hard,
just a little tedious.

Andy

-- 
Andrew J. Ross                NextBus Information Systems
Senior Software Engineer      Emeryville, CA
[EMAIL PROTECTED]              http://www.nextbus.com
"Men go crazy in conflagrations.  They only get better one by one."
  - Sting (misquoted)


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to