mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Add gnetworking.h
Install a public "gnetworking.h" header that can be used to include the relevant OS-dependent networking headers. This does not really abstract away unix-vs-windows however; error codes, in particular, are incompatible. gnetworkingprivate.h now contains just a few internal URI-related functions Also add a g_networking_init() function to gnetworking.h, which can be used to explicitly initialize OS-level networking, rather than having that happen as a side-effect of registering GInetAddress. https://bugzilla.gnome.org/show_bug.cgi?id=623187
This commit is contained in:
@@ -39,16 +39,12 @@
|
||||
|
||||
#include <gio/gsocketcontrolmessage.h>
|
||||
#include <gio/gunixfdmessage.h>
|
||||
#include <gio/gnetworking.h>
|
||||
#include <gio/gsocket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __linux__
|
||||
/* for getsockopt() and setsockopt() */
|
||||
#include <sys/types.h> /* See NOTES */
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GUnixConnection, g_unix_connection,
|
||||
|
Reference in New Issue
Block a user