Re: Differences of GIOChannel between Linux and win32

2007-08-29 Thread Tor Lillqvist
Jim George writes: > My question is: is there some documentation on what part of GIOChannel > is broken on win32 and what's not? Unfortunately not. You are using pipes, and there should hopefully be less variation in behaviour in that case than with sockets. (Even if the implem

Differences of GIOChannel between Linux and win32

2007-08-29 Thread Jim George
ram would never see an eof My question is: is there some documentation on what part of GIOChannel is broken on win32 and what's not? -Jim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GIOChannel, how to free?

2007-04-05 Thread Chris Vine
ontext of his original question, that is not right. His original > > question was whether the callback returning FALSE avoids the need for an > > explicit final call to g_io_channel_unref() to destroy the GIOChannel > > object, assuming that before the callback returns false it onl

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
was whether the callback returning FALSE avoids the need for an > explicit final call to g_io_channel_unref() to destroy the GIOChannel object, > assuming that before the callback returns false it only has a reference count > of 1. Well, yes, if you've already dropped the referenc

Re: GIOChannel, how to free?

2007-04-04 Thread Chris Vine
? > > > > Sure. My question is, how many times (and when) do I have to call it? > > Once when you've finished with it In the context of his original question, that is not right. His original question was whether the callback returning FALSE avoids the need for an explicit fina

Re: GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
ext Iain * wrote: > On 4/4/07, Alberto Mardegan <[EMAIL PROTECTED]> wrote: >> Sure. My question is, how many times (and when) do I have to call it? > > Once when you've finished with it So I may assume that the flow I wrote in my first mail is correct (apart obviously substituting g_object_unref

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
On 4/4/07, Alberto Mardegan <[EMAIL PROTECTED]> wrote: > ext Iain * wrote: > > http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unref > > > > perhaps? > > Sure. My question is, how many times (and when) do I have to call it? > Once when you've finished with it iain __

Re: GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
ext Iain * wrote: > http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unref > > > perhaps? Sure. My question is, how many times (and when) do I have to call it? -- http://www.mardy.it <-- Geek in un lingua international! __

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
On 4/4/07, Alberto Mardegan <[EMAIL PROTECTED]> wrote: > > But according to the docs, g_io_channel_unix_new() creates the channel > with a reference count set to 1, so I guess we need a g_object_unref() > somewhere. http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unr

GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
Hi, I hope this is the correct ML to ask something about glib. I'm creating a GIOChannel with g_io_channel_unix_new() and installing it as a source with g_io_add_watch(). Everything works, but I don't know if/how am I suppose to cleanup the things after the file descriptor close

sendfile through GIOChannel

2006-11-26 Thread Ruben Fonseca
Hi there! I'm building a application which makes extensive use of GLib. Since it is a network application, it uses sockets, so I decided to use the GIOChannel to have a nice higher level on top of sockets. It is working flawlessly. But I have a problem: my application requires the send of

Re: GIOChannel

2006-10-25 Thread Tristan Van Berkom
Kevin DeKorte wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello all, > > I'm using the following code fragment > > ok = g_spawn_async_with_pipes("/tmp", argv, NULL, > G_SPAWN_SEARCH_PATH, > NULL, NULL, NULL, > &std_in, &std_out

GIOChannel

2006-10-24 Thread Kevin DeKorte
dd_watch(channel_in,G_IO_IN , thread_reader,NULL); g_io_add_watch(channel_err, G_IO_ERR , thread_reader,NULL); And this is the callback. gboolean thread_reader(GIOChannel *source, GIOCondition condition, gpointer data) { GString *_output; GIOStatus status; output = g_

Re: GIOChannel and win32?

2006-10-03 Thread Tor Lillqvist
Tomasz Jankowski writes: > [...] someone said [..] that GIOChannel may not work under the > Microsoft Windows? Is that true, or not? It depends. If you are lucky, porting a GIOChannel-using program that works fine on Linux or some other POSIX system to Windows is just a recompilati

GIOChannel and win32?

2006-10-02 Thread Tomasz Jankowski
Hi! Some time ago I created a thread on this mailing list and someone (I don't remember his name now) said, that he read on GTK+ devel list, that GIOChannel may not work under the Microsoft Windows? Is that true, or not? -- Pozdrawiam! Tom ___ gt

Re: Callback on GIOChannel shutdown?

2006-01-16 Thread Braden McDaniel
On Mon, 2006-01-16 at 10:13 +0200, Tor Lillqvist wrote: > Braden McDaniel writes: > > I expected the callback associated with this watch to be called after I > > shut down data.command_channel with g_io_channel_shutdown; however, that > > doesn't appear to be the case. > > You misunderstood wha

Re: Callback on GIOChannel shutdown?

2006-01-16 Thread Tor Lillqvist
connection has shut it down, the physical connection has been hung up, etc). It does not mean that all data has been read by the user process. I.e. you shouldn't stop reading from the GIOChannel just because you get a G_IO_HUP callback. Stop reading only when you get a definite EOF indication

Callback on GIOChannel shutdown?

2006-01-15 Thread Braden McDaniel
I've created a GIOChannel watch like this: GSource * const command_watch = g_io_create_watch(data.command_channel, GIOCondition(G_IO_IN | G_IO_HUP)); I expected the callback associated with this watch to be called after I shut down data.command_channel

Re: GIOChannel reference counting

2005-12-12 Thread Axel Simon
On Mon, 2005-12-12 at 10:56 +, Richard Warren wrote: > Dear all, > > I would be grateful if anyone could tell me whether I need to unreference a > GIOChannel in order to destroy it properly. > > Here's what I'm currently doing: > > 1. I create a channel w

GIOChannel reference counting

2005-12-12 Thread Richard Warren
Dear all, I would be grateful if anyone could tell me whether I need to unreference a GIOChannel in order to destroy it properly. Here's what I'm currently doing: 1. I create a channel with g_io_channel_unix_new() from a socket. The docs state that the initial reference count wil