How do I close a GSocketConnection?



How do I close a established GSocketConnection?

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

Although this page¹ says:
GSocketConnection  is a GIOStream for a connected socket.

¹: http://library.gnome.org/devel/gio/stable/GSocketConnection.html

-- 
Regards,
Ali Polatel

Attachment: pgpOWZ12ShaH1.pgp
Description: PGP signature



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