Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
lablgtk2: receiving messages from network?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-04-16 (22:28)
From: Ivan Matveich <ivan.matveich@g...>
Subject: Re: [Caml-list] lablgtk2: receiving messages from network?
Thanks, module Glib.Io is what I needed.

Now I have another question. I've started writing some code,

module Channel =
    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?