[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004 ]

RE: [edlug] OT: Linux-Windows datastructure exchange C++



Thanks Tim.

A useful lead... i'm amazed at how many people want to post a ton of
stuff (which i already happen to know) without even looking at the
question...

You say:

The MS equivalent is
  #pragma pack

This will presumably pack all the data structures within its scope. Do
you know if theres a way to be more selective over which datastructures
are packed.

Cheers,
Paul.



On Wed, 2004-03-03 at 16:49, Tim Day wrote:
> > You really, REALLY, shouldn't be trying to do this; ideally 
> > you need to
> > marshall binary data across a network connection, to handle 
> > endianness,
> > packing, alignment etc. Use CORBA or DCOM with C++, (if there 
> > is a Linux
> > DCOM implementation), or RMI etc. with Java. 
> 
> Whoah!  Hold it right there.  The technologies you list are clever stuff,
> and have their applications but for simplicity and reliability there's
> nothing beats TCP & UDP.  Do you think the internet would actually
> work any better if it was all built on top of CORBA/DCOM/RPC/RMI ? 
> I don't.  
> 
> KISS: If all he wants to do is get a struct (without any embedded
> pointers) from A to B, then provided he pays attention to packing and
> (too often forgotten in these x86 dominated times) endianness (aka
> "network byte order") ie defines the protocol on the wire then
> why the need for anything more complex.
> 
> --- Sorry, I'm obliged to attach this :---
> 
> Tim Day
> Senior Software Engineer
>  
> Voxar Limited
> Edinburgh - Corporate Headquarters | Boston
> Bonnington Bond, 2 Anderson Place, Edinburgh EH6 5NP, UK
> Tel: +44 (0) 131 472 4792 Fax: +44 (0) 131 472 4799
> Email: tim.day@xxx.xxx.xxx Web: www.voxar.com
>  
> Registered in Scotland No. 145641 Registered Office as above.
> 
> This email is sent subject to the legal requirements set out at
> www.voxar.com/legal/email_policy.htm  
>  
> -
> ----------------------------------------------------------------------
> You can find the EdLUG mailing list FAQ list at:
> http://www.edlug.org.uk/list_faq.html

-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble@morpheux.org.DONTSPAMME
homepage