mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
docs: Move the gnetworking SECTION
Move it to a separate page. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
This commit is contained in:
@@ -53,6 +53,8 @@ content_files = [
|
|||||||
"dbus-utils.md",
|
"dbus-utils.md",
|
||||||
"menu-exporter.md",
|
"menu-exporter.md",
|
||||||
|
|
||||||
|
"networking.md",
|
||||||
|
|
||||||
"migrating-gdbus.md",
|
"migrating-gdbus.md",
|
||||||
"migrating-gconf.md",
|
"migrating-gconf.md",
|
||||||
"migrating-gnome-vfs.md",
|
"migrating-gnome-vfs.md",
|
||||||
|
@@ -237,6 +237,7 @@ expand_content_files = [
|
|||||||
'migrating-gconf.md',
|
'migrating-gconf.md',
|
||||||
'migrating-gdbus.md',
|
'migrating-gdbus.md',
|
||||||
'migrating-gnome-vfs.md',
|
'migrating-gnome-vfs.md',
|
||||||
|
'networking.md',
|
||||||
'overview.md',
|
'overview.md',
|
||||||
'tls-overview.md',
|
'tls-overview.md',
|
||||||
]
|
]
|
||||||
|
29
docs/reference/gio/networking.md
Normal file
29
docs/reference/gio/networking.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Title: gnetworking.h
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
SPDX-FileCopyrightText: 2010 Dan Winship
|
||||||
|
|
||||||
|
# gnetworking.h
|
||||||
|
|
||||||
|
The `<gio/gnetworking.h>` header can be included to get
|
||||||
|
various low-level networking-related system headers, automatically
|
||||||
|
taking care of certain portability issues for you.
|
||||||
|
|
||||||
|
This can be used, for example, if you want to call
|
||||||
|
[`setsockopt()`](man:setsockopt(2)) on a [class@Gio.Socket].
|
||||||
|
|
||||||
|
Note that while WinSock has many of the same APIs as the
|
||||||
|
traditional UNIX socket API, most of them behave at least slightly
|
||||||
|
differently (particularly with respect to error handling). If you
|
||||||
|
want your code to work under both UNIX and Windows, you will need
|
||||||
|
to take these differences into account.
|
||||||
|
|
||||||
|
Also, under GNU libc, certain non-portable functions are only visible
|
||||||
|
in the headers if you define `_GNU_SOURCE` before including them. Note
|
||||||
|
that this symbol must be defined before including any headers, or it
|
||||||
|
may not take effect.
|
||||||
|
|
||||||
|
There is one function provided specifically for initialising the networking
|
||||||
|
APIs, which needs to be called only if they are being used before GLib
|
||||||
|
initialises itself:
|
||||||
|
|
||||||
|
* [func@Gio.networking_init]
|
@@ -25,31 +25,6 @@
|
|||||||
#include "gnetworking.h"
|
#include "gnetworking.h"
|
||||||
#include "gnetworkingprivate.h"
|
#include "gnetworkingprivate.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:gnetworking
|
|
||||||
* @title: gnetworking.h
|
|
||||||
* @short_description: System networking includes
|
|
||||||
* @include: gio/gnetworking.h
|
|
||||||
*
|
|
||||||
* The `<gio/gnetworking.h>` header can be included to get
|
|
||||||
* various low-level networking-related system headers, automatically
|
|
||||||
* taking care of certain portability issues for you.
|
|
||||||
*
|
|
||||||
* This can be used, for example, if you want to call setsockopt()
|
|
||||||
* on a #GSocket.
|
|
||||||
*
|
|
||||||
* Note that while WinSock has many of the same APIs as the
|
|
||||||
* traditional UNIX socket API, most of them behave at least slightly
|
|
||||||
* differently (particularly with respect to error handling). If you
|
|
||||||
* want your code to work under both UNIX and Windows, you will need
|
|
||||||
* to take these differences into account.
|
|
||||||
*
|
|
||||||
* Also, under GNU libc, certain non-portable functions are only visible
|
|
||||||
* in the headers if you define %_GNU_SOURCE before including them. Note
|
|
||||||
* that this symbol must be defined before including any headers, or it
|
|
||||||
* may not take effect.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_networking_init:
|
* g_networking_init:
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user