[gnio] Add g_socket_is_closed



commit c6693f28ff9a0efc0b0f53928485fb2628992a88
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 28 10:11:09 2009 +0200

    Add g_socket_is_closed
---
 gio/gsocket.c |    6 ++++++
 gio/gsocket.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gio/gsocket.c b/gio/gsocket.c
index df8e4ef..55c8191 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -859,6 +859,12 @@ g_socket_close (GSocket *socket,
   return res != -1;
 }
 
+gboolean
+g_socket_is_closed (GSocket *socket)
+{
+  return socket->priv->closed;
+}
+
 GSource *
 g_socket_create_source (GSocket      *socket,
                         GIOCondition  condition,
diff --git a/gio/gsocket.h b/gio/gsocket.h
index 5e84f13..050d390 100644
--- a/gio/gsocket.h
+++ b/gio/gsocket.h
@@ -148,6 +148,7 @@ gssize                 g_socket_send_message            (GSocket
 							 GError                 **error);
 gboolean               g_socket_close                   (GSocket                 *socket,
 							 GError                 **error);
+gboolean               g_socket_is_closed               (GSocket                 *socket);
 GSource *              g_socket_create_source           (GSocket                 *socket,
 							 GIOCondition             condition,
 							 GCancellable            *cancellable);



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