gsocketlistener: Clarify documentation of add_inet_port()

It wasn’t clear what the fallback behaviour of IPv4 vs IPv6 was, or that
the same port was used for both.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2019-02-19 18:08:59 +00:00
committed by Philip Withnall
parent 36189525f7
commit d0b4979327

View File

@@ -420,6 +420,14 @@ g_socket_listener_add_address (GSocketListener *listener,
* creates a TCP/IP socket listening on IPv4 and IPv6 (if
* supported) on the specified port on all interfaces.
*
* If possible, the [class@Gio.SocketListener] will listen on both IPv4 and
* IPv6 (listening on the same port on both). If listening on one of the socket
* families fails, the [class@Gio.SocketListener] will only listen on the other.
* If listening on both fails, an error will be returned.
*
* If you need to distinguish whether listening on IPv4 or IPv6 or both was
* successful, connect to [signal@Gio.SocketListener::event].
*
* @source_object will be passed out in the various calls
* to accept to identify this particular source, which is
* useful if you're listening on multiple addresses and do