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
this documentation is... Happen to have a URL > >> handy? > >> > > > > The docs are also in most devhelp installations, try "$ devhelp" on your > > console. > > I assumed that the question pertained to the "gnu standard structure for >

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

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 concer

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 signal

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(),

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 __

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_ch

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 ru

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

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-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 knowled

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 WSAEWO

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 work

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 prog

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 g

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 gdk_inp

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-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 no

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 gtk-app-devel-list@gnom

Re: g_io_channel

2005-07-08 Thread Vivien Malerba
On 7/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > 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, >

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, >

g_io_channel

2005-07-08 Thread The Saltydog
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,

g_io_channel problems

2005-05-30 Thread Colossus
Hi, I use g_spawn_async_with_pipes with these parameters: if ( ! g_spawn_async_with_pipes ( NULL, argv, NULL, (GSpawnFlags) G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NUL

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"

g_io_channel

2005-05-01 Thread Denis
how i can use g_io_channel to make a simple "echo"-server? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: g_io_channel functions

2005-02-04 Thread Gyözö Both
l or a > > short source code example for the usage of the g_io_channel* > > functions of glib? (are those functions the ones i need, anyway?) > > > > and is it possible to implement such an architecture without using > > socket.h from libc, only using glib? > > Us

Re: g_io_channel functions

2005-02-04 Thread Carsten Burstedde
> i'm considering introducing a server/client architecture in one of my > projects. unfortunately i know nothing about implementing sockets, > internet communication and such. is there a tutorial or a short > source code example for the usage of the g_io_channel* functions of &

g_io_channel functions

2005-02-04 Thread Gyözö Both
i'm considering introducing a server/client architecture in one of my projects. unfortunately i know nothing about implementing sockets, internet communication and such. is there a tutorial or a short source code example for the usage of the g_io_channel* functions of glib? (are those func