[vala] posix: add socklen_t, setsockopt(2), and getsockopt(2)
- From: Michael Lauer <mlauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] posix: add socklen_t, setsockopt(2), and getsockopt(2)
- Date: Wed, 22 Dec 2010 23:24:15 +0000 (UTC)
commit bf8cb0354d61b470a2d6d272b4b022584dfa7aeb
Author: Michael 'Mickey' Lauer <mickey vanille-media de>
Date: Wed Dec 22 23:46:28 2010 +0100
posix: add socklen_t, setsockopt(2), and getsockopt(2)
vapi/posix.vapi | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index 32da7af..19f00c6 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1268,18 +1268,27 @@ namespace Posix {
public const int AF_UNIX;
[CCode (cheader_filename = "sys/socket.h", sentinel = "")]
public int accept (int sfd, ... );
- [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
+ [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
public int bind (int sockfd, ...);
[CCode (cheader_filename = "sys/socket.h", sentinel = "")]
public int connect(int sfd, ... );
- [CCode (cheader_filename = "sys/socket.h")]
+ [CCode (cheader_filename = "sys/socket.h")]
+ public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
+ [CCode (cheader_filename = "sys/socket.h")]
public int listen (int sfd, int backlog);
- [CCode (cheader_filename = "sys/socket.h")]
+ [CCode (cheader_filename = "sys/socket.h")]
+ public int setsockopt(int sockfd, int level, int optname, void* optval, socklen_t optlen);
+ [CCode (cheader_filename = "sys/socket.h")]
public int socket (int domain, int type, int protocol);
-
[CCode (cheader_filename = "sys/socket.h")]
public int socketpair (int domain, int type, int protocol, int[] sv);
+ [SimpleType]
+ [IntegerType]
+ [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0")]
+ public struct socklen_t {
+ }
+
[SimpleType]
[CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h", destroy_function = "")]
public struct InAddr {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]