[gnio/connection-factory] Add g_socket_connecton_get_socket



commit 9747b38b3580b53b977611298e7f457fa9798fdd
Author: Alexander Larsson <alexl redhat com>
Date:   Fri May 8 21:35:02 2009 +0200

    Add g_socket_connecton_get_socket
---
 gio/gsocketconnection.c |    8 ++++++++
 gio/gsocketconnection.h |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/gio/gsocketconnection.c b/gio/gsocketconnection.c
index 4c177a3..f7826f1 100644
--- a/gio/gsocketconnection.c
+++ b/gio/gsocketconnection.c
@@ -87,6 +87,14 @@ g_socket_connection_get_output_stream (GIOStream *io_stream)
   return g_object_ref (connection->priv->output_stream);
 }
 
+GSocket *
+g_socket_connection_get_socket (GSocketConnection *connection)
+{
+  g_return_val_if_fail (G_IS_SOCKET_CONNECTION (connection), NULL);
+
+  return connection->priv->socket;
+}
+
 static void
 g_socket_connection_get_property (GObject *object, guint prop_id,
                                   GValue *value, GParamSpec *pspec)
diff --git a/gio/gsocketconnection.h b/gio/gsocketconnection.h
index 55b1996..8fad718 100644
--- a/gio/gsocketconnection.h
+++ b/gio/gsocketconnection.h
@@ -55,6 +55,7 @@ struct _GSocketConnection
 
 GType              g_socket_connection_get_type                  (void);
 
+GSocket           *g_socket_connection_get_socket                (GSocketConnection *connection);
 gboolean           g_socket_connection_close                     (GSocketConnection *connection,
 								  GError **error);
 



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