]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Add shutdown() and shutdown constants.
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 15 Jan 2011 09:57:54 +0000 (10:57 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 15 Jan 2011 10:00:14 +0000 (11:00 +0100)
Fixes bug 638916.

vapi/posix.vapi

index 260f66af56fd568a06b0d7de5bdf3d7d3ec840ac..af15a27806b8b1dd8207c05f63ef16513a5c64a2 100644 (file)
@@ -1266,25 +1266,35 @@ namespace Posix {
        public const int AF_INET6;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int AF_UNIX;
+
+       [CCode (cheader_filename = "sys/socket.h")]
+       public const int SHUT_RD;
+       [CCode (cheader_filename = "sys/socket.h")]
+       public const int SHUT_WR;
+       [CCode (cheader_filename = "sys/socket.h")]
+       public const int SHUT_RDWR;
+
        [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")]
-    public int getsockopt (int sockfd, int level, int optname, void* optval, out socklen_t optlen);
-    [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")]
-    public ssize_t send (int sockfd, void* buf, size_t len, int flags);
-    [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
-    public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
-    [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
-    public ssize_t sendmsg (int sockfd, ...);
-    [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")]
+       [CCode (cheader_filename = "sys/socket.h")]
+       public ssize_t send (int sockfd, void* buf, size_t len, int flags);
+       [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
+       public ssize_t sendto (int sockfd, void* buf, size_t len, int flags, ...);
+       [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
+       public ssize_t sendmsg (int sockfd, ...);
+       [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 shutdown (int sockfd, int how);
+       [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);