mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gsocketlistener: Clarify documentation of add_any_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:
committed by
Philip Withnall
parent
64cc9bbc40
commit
36189525f7
@@ -1060,6 +1060,14 @@ g_socket_listener_close (GSocketListener *listener)
|
||||
* This is useful if you need to have a socket for incoming connections
|
||||
* but don't care about the specific port number.
|
||||
*
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user