Add an event signal to GSocketListener

This allows the caller to know when a socket has been bound so that
it can for instance set the SO_SENDBUF and SO_RECVBUF socket options
before listen is called

https://bugzilla.gnome.org/show_bug.cgi?id=738207
This commit is contained in:
Paolo Borelli
2014-10-09 15:54:43 +02:00
parent ec9c248d7d
commit b64e2956f6
5 changed files with 218 additions and 18 deletions

View File

@@ -1750,6 +1750,29 @@ typedef enum {
G_SOCKET_CLIENT_COMPLETE
} GSocketClientEvent;
/**
* GSocketListenerEvent:
* @G_SOCKET_LISTENER_BINDING: The listener is about to bind a socket.
* @G_SOCKET_LISTENER_BOUND: The listener has bound a socket.
* @G_SOCKET_LISTENER_LISTENING: The listener is about to start
* listening on this socket.
* @G_SOCKET_LISTENER_LISTENED: The listener is now listening on
* this socket.
*
* Describes an event occurring on a #GSocketListener. See the
* #GSocketListener::event signal for more details.
*
* Additional values may be added to this type in the future.
*
* Since: 2.46
*/
typedef enum {
G_SOCKET_LISTENER_BINDING,
G_SOCKET_LISTENER_BOUND,
G_SOCKET_LISTENER_LISTENING,
G_SOCKET_LISTENER_LISTENED
} GSocketListenerEvent;
/**
* GTestDBusFlags:
* @G_TEST_DBUS_NONE: No flags.