[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michal Moskal <malekith@p...> |
| Subject: | Re: [Caml-list] help regarding 'union' |
On Tue, May 28, 2002 at 09:52:54AM +0200, Animesh Pathak wrote:
> dear members,
> I am new to caml and am currently trying to write a program which involves
> sending of data across a network connection. What I have to do is to send a
> complex structure (containing lists of integers, mutexes etc. ) across a
> network. In C, i would have used a 'union' with a char array and sent the
> array... how is it done in caml?
> Kindly help me regarding this problem of mine.
Look at module Marshal. You can convert any (well, non-cyclic)
datastructure to string and send it. However beware that marshalled
structures might be imcompatible between OCaml releases (they however
are compatible (unlike C union solution) between different machines).
--
: Michal Moskal ::::: malekith/at/pld-linux.org : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners