summaryrefslogtreecommitdiff
path: root/libsoup/soup-session.h
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2018-01-04 18:10:06 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2018-02-01 15:20:51 +0100
commitd852881f1ab7d6107b2581d3a28d3529b85ea298 (patch)
treef598a0db77e2b3f0832a1ebeab0f09dac411bfc0 /libsoup/soup-session.h
parentf8adddd69bad32d347351075c8a2f09d0ec01004 (diff)
downloadlibsoup-d852881f1ab7d6107b2581d3a28d3529b85ea298.tar.gz
Add new API to create a new connection from a SoupSession
Add soup_session_connect_async() to create a new dedicated connection to the given SoupURI. The operation finishes when the connection has been completed, including any TLS handshacking or proxy negotiation, returning a GIOStream that can be used to communicate with the server. This is based on a patch by Dirkjan Ochtman <dirkjan@ochtman.nl>. https://bugzilla.gnome.org/show_bug.cgi?id=792212
Diffstat (limited to 'libsoup/soup-session.h')
-rw-r--r--libsoup/soup-session.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h
index 25dd02b8..24e90b29 100644
--- a/libsoup/soup-session.h
+++ b/libsoup/soup-session.h
@@ -234,6 +234,24 @@ SoupWebsocketConnection *soup_session_websocket_connect_finish (SoupSession
GAsyncResult *result,
GError **error);
+typedef void (*SoupSessionConnectProgressCallback) (SoupSession *session,
+ GSocketClientEvent event,
+ GIOStream *connection,
+ gpointer user_data);
+
+SOUP_AVAILABLE_IN_2_62
+void soup_session_connect_async (SoupSession *session,
+ SoupURI *uri,
+ GCancellable *cancellable,
+ SoupSessionConnectProgressCallback progress_callback,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+SOUP_AVAILABLE_IN_2_62
+GIOStream *soup_session_connect_finish (SoupSession *session,
+ GAsyncResult *result,
+ GError **error);
+
G_END_DECLS
#endif /* SOUP_SESSION_H */