g_io_channel too slow on linux

2008-08-05 Thread Luis Ariel Lecca
Hello, please take a moment to read this. I will appreciate any help. I have a gtk application that runs on linux and win32. I writing on a serial display but on linux the com flushes too slow while on win32 seems ok. I test it the display with the hyperterminal and didnt see any problem with it.

RE: Linux signals and GLIB g_io_channel usage

2006-11-13 Thread James Scott Jr
On Mon, 2006-11-13 at 02:15 -0500, Freddie Unpenstein wrote: On Mon 10/23, James Scott Jr [EMAIL PROTECTED] wrote: I am about to write the socket module of a program that follows the gnu standard structure for a daemon. I am using glib wherever possible and have a question concerning the

Re: Linux signals and GLIB g_io_channel usage

2006-11-13 Thread C.R. Kirkwood-Watts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Scott Jr wrote: On Mon, 2006-11-13 at 02:15 -0500, Freddie Unpenstein wrote: On Mon 10/23, James Scott Jr [EMAIL PROTECTED] wrote: I am about to write the socket module of a program that follows the gnu standard structure for a daemon. I

Re: Linux signals and GLIB g_io_channel usage

2006-11-13 Thread James Scott Jr
to the gnu standard structure for a daemon part of your post. In either case, I would like to know whence _that_ documentation. Chris. Ok, I may have misunderstood the question, as my answer related to g_io_channel... usage. If I am back on track, the standard daemon model is based on my

RE: Linux signals and GLIB g_io_channel usage

2006-11-12 Thread Freddie Unpenstein
On Mon 10/23, James Scott Jr [EMAIL PROTECTED] wrote: I am about to write the socket module of a program that follows the gnu standard structure for a daemon. I am using glib wherever possible and have a question concerning the use of linux signals. Basically, I have blocked all signals on

Linux signals and GLIB g_io_channel usage

2006-10-23 Thread James Scott Jr
and use a single thread with a sigwait() to process the ones I'm interested in; like SIGHUP to reload the config file. Question: Will having all signals blocked interfere with the normal operation of glib, in such a way that that I need to rethink how to handle signals? I plan to use g_io_channel

Re: Linux signals and GLIB g_io_channel usage

2006-10-23 Thread Tristan Van Berkom
James Scott Jr wrote: Folks, Hi James, in a phrase - I've done it and it works fine. some places might call for special attention though - for example - if you were to call g_spawn_sync() or g_child_watch(), you may want to have leave SIGCHLD available. Cheers, -Tristan

Re: Linux signals and GLIB g_io_channel usage

2006-10-23 Thread James Scott Jr
On Mon, 2006-10-23 at 13:42 -0400, Tristan Van Berkom wrote: James Scott Jr wrote: Folks, Hi James, in a phrase - I've done it and it works fine. some places might call for special attention though - for example - if you were to call g_spawn_sync() or g_child_watch(), you may

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-18 Thread Tor Lillqvist
when it moves on to build gobject, it hangs up while running glib-genmarshal. If I look at the task manager, ntvdm.exe is using a lot of CPU - why would glib-genmarshal be using the 16-bit VM? Heh, no reason. One thing to look out for is that the glib-genmarshal.exe you built needs to run

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-17 Thread Daniel Atallah
On 11/16/05, Tor Lillqvist [EMAIL PROTECTED] wrote: See the patch below that clears up some of the issues: 1) After getting FD_CLOSE, make the knowledge of that stick and always set G_IO_HUP. 2) Plug a handle leak, WSACloseEvent the socket's event when the channel is closed. If you can build

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-15 Thread Tor Lillqvist
There are some problems both in your code, and in giowin32.c. For efficiency, your code should not read just one byte at a time in the callback. It should read in bigger chunks, and as much as possible in a loop, until it gets a WSAEWOULDBLOCK or an EOF. If it did this, it would probably also

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-15 Thread Daniel Atallah
On 11/15/05, Tor Lillqvist [EMAIL PROTECTED] wrote: There are some problems both in your code, and in giowin32.c. For efficiency, your code should not read just one byte at a time in the callback. It should read in bigger chunks, and as much as possible in a loop, until it gets a

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-15 Thread Tor Lillqvist
I fixed that (and what do you know... it works!). Thanks for noticing. Good to hear! Should I make an attempt at the changes to giowin32.c, or is that something you've already got sorted out? See the patch below that clears up some of the issues: 1) After getting FD_CLOSE, make the knowledge

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-15 Thread Tor Lillqvist
Tor Lillqvist writes: See the patch below that clears up some of the issues: Forgot to mention, 3) Calls WSAEnumNetworkEvents() only if the event for the socket has fired. This means the spurious WSAEnumNetworkEvents() calls you noticed being logged when just moving the mouse don't happen any

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-14 Thread Tor Lillqvist
g_io_win32_check: WSAEnumNetworkEvents (1576, 0x618) revents={} condition={IN|ERR|HUP} events={} What seems to happen is that after watching a socket io channel once, I'll continue to see these messages until I restart the program - even if the io channel should have been cleaned up by

Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-14 Thread Daniel Atallah
On 11/14/05, Tor Lillqvist [EMAIL PROTECTED] wrote: g_io_win32_check: WSAEnumNetworkEvents (1576, 0x618) revents={} condition={IN|ERR|HUP} events={} What seems to happen is that after watching a socket io channel once, I'll continue to see these messages until I restart the program - even

Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)

2005-11-13 Thread Daniel Atallah
Greetings, I'm having a strange problem in trying to get a program (gaim) working with Glib 2.8.x (2.8.3) under win32. I'm watching for IO on a socket using g_io_channel_unix_new(fd), and then watching for the result using g_io_add_watch_full() (basically using functionality modeled after

Re: g_io_channel

2005-07-08 Thread uzytkownik22
I need to send a data structure over an io_channel. In the reference manual, I found that the only available instruction to write data in a channel is: GIOStatus g_io_channel_write_chars(GIOChannel *channel, const gchar *buf,

Re: g_io_channel

2005-07-08 Thread Tor Lillqvist
Vivien Malerba writes: if it's on the same machine, then no problem!). ...as long as the writer and reader processes are compiled with the same compiler and compiler options, that is. --tml ___ gtk-app-devel-list mailing list

Re: g_io_channel

2005-07-08 Thread The Saltydog
On 7/8/05, Vivien Malerba [EMAIL PROTECTED] wrote: Beware however that depending on the contents of your structure, you may have some problems if you exchange data this way between machines which do not have the same endian-ness (if it's on the same machine, then no problem!). should not be

Re: g_io_channel

2005-07-08 Thread John Vetterli
On Fri, 8 Jul 2005, Vivien Malerba wrote: On 7/8/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: g_io_channel_write_chars(channel, (const gchar *)your_struct, sizeof (your_struct), written, errors); Beware however that depending on the contents of your structure, you may have some problems if

RE: g_io_channel

2005-05-01 Thread Freddie Unpenstein
how i can use g_io_channel to make a simple echo-server? libgnet comes with a simple example which does exactly that. Which reminds me... Does anyone know the differences between gnet and gnetwork? Which is the more GNOME sanctioned of the two? Fredderic