[glib/glib-2-48] socketservice: Document that it starts pre-activated.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-48] socketservice: Document that it starts pre-activated.
- Date: Wed, 17 Aug 2016 21:40:42 +0000 (UTC)
commit 077a7a482109a9f7166ab00c9ff58e8e39a370a6
Author: Olivier CrĂȘte <olivier crete collabora com>
Date: Mon Apr 14 15:48:41 2014 -0400
socketservice: Document that it starts pre-activated.
https://bugzilla.gnome.org/show_bug.cgi?id=728207
gio/gsocketservice.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gio/gsocketservice.c b/gio/gsocketservice.c
index 746dd86..b10491b 100644
--- a/gio/gsocketservice.c
+++ b/gio/gsocketservice.c
@@ -251,8 +251,10 @@ g_socket_service_is_active (GSocketService *service)
* g_socket_service_start:
* @service: a #GSocketService
*
- * Starts the service, i.e. start accepting connections
- * from the added sockets when the mainloop runs.
+ * Restarts the service, i.e. start accepting connections
+ * from the added sockets when the mainloop runs. This only needs
+ * to be called after the service has been stopped from
+ * g_socket_service_stop().
*
* This call is thread-safe, so it may be called from a thread
* handling an incoming client request.
@@ -283,6 +285,10 @@ g_socket_service_start (GSocketService *service)
* close the listening sockets, call g_socket_listener_close(). (This
* will happen automatically when the #GSocketService is finalized.)
*
+ * This must be called before calling g_socket_listener_close() as
+ * the socket service will start accepting connections immediately
+ * when a new socket is added.
+ *
* Since: 2.22
*/
void
@@ -401,6 +407,10 @@ g_socket_service_ready (GObject *object,
* New listeners can be added with e.g. g_socket_listener_add_address()
* or g_socket_listener_add_inet_port().
*
+ * New services are created active, there is no need to call
+ * g_socket_service_start(), unless g_socket_service_stop() has been
+ * called before.
+ *
* Returns: a new #GSocketService.
*
* Since: 2.22
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]