[gnio] Add getter and setter for listen_backlog
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnio] Add getter and setter for listen_backlog
- Date: Tue, 28 Apr 2009 06:08:55 -0400 (EDT)
commit 1e4e404e06494683cc2e79858d093c4bf80f6ce0
Author: Alexander Larsson <alexl redhat com>
Date: Tue Apr 28 10:50:20 2009 +0200
Add getter and setter for listen_backlog
---
gio/gsocket.c | 17 +++++++++++++++++
gio/gsocket.h | 3 +++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/gio/gsocket.c b/gio/gsocket.c
index b63be17..85e00f7 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -554,6 +554,23 @@ g_socket_get_reuse_address (GSocket *socket)
return socket->priv->reuse_address;
}
+gint
+g_socket_get_listen_backlog (GSocket *socket)
+{
+ g_return_val_if_fail (G_IS_SOCKET (socket), 0);
+
+ return socket->priv->listen_backlog;
+}
+
+void
+g_socket_set_listen_backlog (GSocket *socket,
+ gint backlog)
+{
+ g_return_if_fail (G_IS_SOCKET (socket));
+
+ socket->priv->listen_backlog = backlog;
+}
+
GSocketAddress *
g_socket_get_local_address (GSocket *socket,
GError **error)
diff --git a/gio/gsocket.h b/gio/gsocket.h
index 050d390..0a87590 100644
--- a/gio/gsocket.h
+++ b/gio/gsocket.h
@@ -88,6 +88,9 @@ gboolean g_socket_get_blocking (GSocket
void g_socket_set_reuse_address (GSocket *socket,
gboolean reuse);
gboolean g_socket_get_reuse_address (GSocket *socket);
+gint g_socket_get_listen_backlog (GSocket *socket);
+void g_socket_set_listen_backlog (GSocket *socket,
+ gint backlog);
gboolean g_socket_has_error (GSocket *socket,
GError **error);
gboolean g_socket_is_connected (GSocket *socket);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]