From: Eric Cooper <ecc@cmu.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] lablgtk2: receiving messages from network?
Date: Sat, 15 Apr 2006 16:58:24 -0400 [thread overview]
Message-ID: <20060415205824.GA16109@localhost> (raw)
In-Reply-To: <b5def3a40604151233q774da2d8q403d6048c861c006@mail.gmail.com>
On Sat, Apr 15, 2006 at 03:33:36PM -0400, Ivan Matveich wrote:
> I'm writing a gtk program that must receive data through a tcp
> connection and react to it immediately.
>
> What's the best way to implement this?
> Can gtk call me back when data is available on a socket?
> How do I use Marshal without blocking?
You can use the Glib.IO interface to create a glib io_channel from
your TCP socket, and then use add_watch to associate a callback with
it. Your socket will then be polled as part of the Glib main event loop.
--
Eric Cooper e c c @ c m u . e d u
next prev parent reply other threads:[~2006-04-15 20:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 19:33 Ivan Matveich
2006-04-15 19:45 ` [Caml-list] " yoann padioleau
2006-04-15 20:10 ` Markus Mottl
2006-04-15 20:58 ` Eric Cooper [this message]
2006-04-15 22:54 ` Remi Vanicat
2006-04-16 22:28 ` Ivan Matveich
2006-04-16 23:45 ` Jacques Garrigue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060415205824.GA16109@localhost \
--to=ecc@cmu.edu \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).