Re: How to use socket conditions ?

2015-07-11 Thread Carl Nygard
Not sure how glib socket handles this, but typically for socket disconnects you'll get an indication that there is content ready to read on the socket (say, from a select call) but when you read from the socket, it reports zero bytes and no errors. That's the indication that the other side hung

Re: How to use socket conditions ?

2015-07-11 Thread Chris Vine
On Sat, 11 Jul 2015 00:09:54 -0400 Jacques Pelletier jpellet...@ieee.org wrote: Hi, I'm using a glib socket: when a client (glib) is connected to a server, the client doesn't get the HUP messages when the server closes its connection. That's probably because the socket implementation does

How to use socket conditions ?

2015-07-10 Thread Jacques Pelletier
Hi, I'm using a glib socket: when a client (glib) is connected to a server, the client doesn't get the HUP messages when the server closes its connection. Here is my code below: gboolean SocketPollRead(gpointer data) { switch (g_socket_condition_check(ptSocket,G_IO_IN | G_IO_ERR |