Re: How do I close a GSocketConnection?



On Sun, Dec 27, 2009 at 06:28:33PM +0200, Ali Polatel wrote:
> How do I close a established GSocketConnection?

Using g_io_stream_close().

> The following doesn't work:
> GSocketConnection *conn;
> ...
> g_io_stream_close(G_IO_STREAM(conn));
> GLib-GIO-CRITICAL **: g_io_stream_close: assertion `G_IS_IO_STREAM (stream)' failed
> 
> g_object_unref fails too:
> GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

This looks like conn is an invalid pointer, perhaps to an already
destroyed object.  So it matters what has happened in the `...' part.

Yeti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]