Add UDP support to GSocketListener
Submitted by Philip Withnall
It would be useful if GSocketListener supported UDP as well as TCP. How about something like:
guint16 g_socket_listener_add_inet_port_full (GSocketListener *listener, GSocketType type, GSocketProtocol protocol, guint16 port, GObject *source_object, GError **error);
which would generalise the current implementations of g_socket_listener_add_inet_port() and g_socket_listener_add_any_inet_port() (so it would allow @port to be zero).
I’m wondering whether adding support for setting the default UDP destination address (i.e. calling g_socket_connect() on each socket) would be best supported in this function call, or in a separate function call.
What do people think? I can come up with a patch if it’s likely to be accepted.