RE: poll with timeout 0 in main loop

2010-10-22 Thread Juan Pablo L .
l code and let you know asap > Date: Fri, 22 Oct 2010 14:27:54 +0100 > From: ch...@cvine.freeserve.co.uk > To: ch...@cvine.freeserve.co.uk > CC: jpablolorenze...@hotmail.com; gtk-app-devel-list@gnome.org > Subject: Re: poll with timeout 0 in main loop > > On Fri, 22

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 13:53:55 +0100 Chris Vine wrote: > On Fri, 22 Oct 2010 10:37:01 + > Juan Pablo L. wrote: > > i attached the code but did not make thru, here is the server code: > > Something odd is going on. > > I see you are using GIOChannel not to do any reading, but in order to > no

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 10:37:01 + Juan Pablo L. wrote: > i attached the code but did not make thru, here is the server code: Something odd is going on. I see you are using GIOChannel not to do any reading, but in order to notify you that a connection is available. poll()/select() of course sup

RE: poll with timeout 0 in main loop

2010-10-22 Thread Juan Pablo L .
ptr_array_remove(p_client->my_server->clients_list,p_client); return TRUE; } and the server is astarted only once from the main thread. regarding GIO, i like to have like control of things so i m just sticking with glib, what i need from glib are the special structucures like array pointe

RE: poll with timeout 0 in main loop

2010-10-22 Thread Juan Pablo L .
st@gnome.org > Subject: Re: poll with timeout 0 in main loop > > On Fri, 22 Oct 2010 02:57:59 + > Juan Pablo L. wrote: > > hi, this is the code that makes the server socket > [snip] > > There doesn't seem anything especially wrong with this but you have a > lot

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 02:57:59 + Juan Pablo L. wrote: > hi, this is the code that makes the server socket [snip] There doesn't seem anything especially wrong with this but you have a lot of code missing. In particular, what does your tcp_server_handle_connection_events() callback do, such as w

Re: poll with timeout 0 in main loop

2010-10-21 Thread Maginot Junior
strerror(errno)); > // close the socket > close(fd); > return -1; > } > if(listen(fd,10) < 0) > { > *p_error = > g_error_new(G_IO_CHANNEL_ERROR,G_IO_CHANNEL_ERROR_FAILED,"Could not start > listening on the server socket: %s",strerro

RE: poll with timeout 0 in main loop

2010-10-21 Thread Juan Pablo L .
{ *p_error = g_error_new(G_IO_CHANNEL_ERROR,G_IO_CHANNEL_ERROR_FAILED,"Could not start listening on the server socket: %s",strerror(errno)); // close the socket close(fd); return -1; } return fd; } thanks ! Date: Fri, 22 Oct 2010 00:06:08 -0

Re: poll with timeout 0 in main loop

2010-10-21 Thread Maginot Junior
On Thu, Oct 21, 2010 at 11:27 PM, Juan Pablo L. < jpablolorenze...@hotmail.com> wrote: > > Hi, i have a problem with an application i m building with glib-2.24.2 on > linux, i create a server socket which i use to create a GIOChannel and add > it to a main loop, everything was fine until i found t