English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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?