On Fri, 2011-08-05 at 16:54 +0200, walter harms wrote:
> there are the htonl() etc. what do automatic the right thing.

That works just fine when the wire protocol is defined in "network
order", ie. big-endian, which is very common for proper, grown-up
Internet protocols.  You still need to use the correct form of the call
for the size of data for the same reasons.

As I understand it though, the X protocol can run either big- or
little-endian on the wire.  This is supposedly to avoid the overhead of
byte-swapping back and forth if both client and server are little-endian
(as is the common case on an x86 desktop PC).  Instead we must take the
overhead of deciding whether to swap or not...

-- 
------
From: Jonathan Morton
      jonathan.mor...@movial.com


_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to