Browse thread
lablgtk2: receiving messages from network?
-
Ivan Matveich
- yoann padioleau
- Markus Mottl
- Eric Cooper
-
Remi Vanicat
-
Ivan Matveich
- Jacques Garrigue
-
Ivan Matveich
[
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: | 2006-04-16 (23:45) |
From: | Jacques Garrigue <garrigue@m...> |
Subject: | Re: [Caml-list] lablgtk2: receiving messages from network? |
From: "Ivan Matveich" <ivan.matveich@gmail.com> > Now I have another question. I've started writing some code, > > module Channel = > struct > type event = > | Connected of Unix.sockaddr > | Dropped of Unix.sockaddr > | Received of Unix.sockaddr * x > | Sent of Unix.sockaddr * x > type action = > | Associate of Unix.sockaddr > | Dissociate of Unix.sockaddr > | Send of Unix.sockaddr * x > > where x will be something returned by Marshal.from_string. > > How do I properly specify its type? I suppose x should be Obj.t, meaning that you're going to use Obj.repr and Obj.obj. This is clearly unsafe, but any use of Marshal is. Jacques Garrigue