Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 =
  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?