Re: Using GSocket in a GTK application

2011-02-23 Thread Jacques Pelletier
On Wednesday 23 February 2011 08:01:12 you wrote: > On Tue, 22 Feb 2011 23:25:43 -0500 > Jacques Pelletier wrote: > [snip] > > > ... > > > > /* Connect asynchronously */ > > > > mySocketClient = g_socket_client_new(); > > > > g_socket_client_connect_to_host_async(

Re: Using GSocket in a GTK application

2011-02-23 Thread Chris Vine
On Tue, 22 Feb 2011 23:25:43 -0500 Jacques Pelletier wrote: [snip] > ... > /* Connect asynchronously */ > mySocketClient = g_socket_client_new(); > > g_socket_client_connect_to_host_async( > mySocketClient, > myUrl, > myPort, > NULL, > m

Re: Using GSocket in a GTK application

2011-02-22 Thread Nader Morshed
> Any comments about how to improve, missing code, etc.? I would personally recommend taking a look at the GIOStream API for processing data sent through the connection, it would help save a bit of the low-level worries and allow you to get automatically-buffered input through the help of GBuffer

Re: Using GSocket in a GTK application

2011-02-22 Thread Jacques Pelletier
On Sunday 13 February 2011 22:17:12 Jacques Pelletier wrote: > Hi all, > > I'm using GSocket in a GTK application in non-blocking mode. > > Once the connection is done, I'm creating a source for the main event loop: > my_source = g_socket_create_source(my_socket

Using GSocket in a GTK application

2011-02-13 Thread Jacques Pelletier
Hi all, I'm using GSocket in a GTK application in non-blocking mode. Once the connection is done, I'm creating a source for the main event loop: my_source = g_socket_create_source(my_socket, my_events, NULL); How do we specify a callback? Should I use g_source_set_callba