summaryrefslogtreecommitdiff
path: root/gio/gsocketconnection.h
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-06-12 16:29:04 -0400
committerDan Winship <danw@gnome.org>2011-12-22 13:22:25 -0500
commit57f279988cc2219a974042a29cbb12efd2422540 (patch)
tree621338f66c716b946bda80d073d63b90cfd5c246 /gio/gsocketconnection.h
parente121d46b251d7a695f6c56bf3de95acb51371599 (diff)
downloadglib-57f279988cc2219a974042a29cbb12efd2422540.tar.gz
Add g_socket_connection_connect(), etc
Previously it was more or less assumed that GSocketConnections were always connected, although this was not enforced. Make it explicit that they don't need to be, and add methods to connect them, and simplify GSocketClient by using those methods. https://bugzilla.gnome.org/show_bug.cgi?id=665805
Diffstat (limited to 'gio/gsocketconnection.h')
-rw-r--r--gio/gsocketconnection.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gio/gsocketconnection.h b/gio/gsocketconnection.h
index 1edc2f44c..34a0cb184 100644
--- a/gio/gsocketconnection.h
+++ b/gio/gsocketconnection.h
@@ -72,11 +72,26 @@ struct _GSocketConnection
GType g_socket_connection_get_type (void) G_GNUC_CONST;
+gboolean g_socket_connection_is_connected (GSocketConnection *connection);
+gboolean g_socket_connection_connect (GSocketConnection *connection,
+ GSocketAddress *address,
+ GCancellable *cancellable,
+ GError **error);
+void g_socket_connection_connect_async (GSocketConnection *connection,
+ GSocketAddress *address,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean g_socket_connection_connect_finish (GSocketConnection *connection,
+ GAsyncResult *result,
+ GError **error);
+
GSocket *g_socket_connection_get_socket (GSocketConnection *connection);
GSocketAddress *g_socket_connection_get_local_address (GSocketConnection *connection,
GError **error);
GSocketAddress *g_socket_connection_get_remote_address (GSocketConnection *connection,
GError **error);
+
void g_socket_connection_factory_register_type (GType g_type,
GSocketFamily family,
GSocketType type,