summaryrefslogtreecommitdiff
path: root/src/sys/socket/consts.rs
diff options
context:
space:
mode:
authorhoxnox <hoxnox@gmail.com>2015-05-21 11:58:56 +0300
committerhoxnox <hoxnox@gmail.com>2015-05-21 11:58:56 +0300
commit075c037f8b85fde33d29ff591958e23cac88139e (patch)
tree56faa09af8be4670cc3ed3d31446fe4fe41aac50 /src/sys/socket/consts.rs
parentd645d911d5b9e5d600a57225dbdf5bd4adc91b98 (diff)
downloadnix-075c037f8b85fde33d29ff591958e23cac88139e.zip
Add socket::shutdown function
libc::funcs::bsd43::shutdown is used
Diffstat (limited to 'src/sys/socket/consts.rs')
-rw-r--r--src/sys/socket/consts.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sys/socket/consts.rs b/src/sys/socket/consts.rs
index a2bb535b..91337189 100644
--- a/src/sys/socket/consts.rs
+++ b/src/sys/socket/consts.rs
@@ -88,6 +88,11 @@ mod os {
pub const MSG_OOB: SockMessageFlags = 0x1;
pub const MSG_PEEK: SockMessageFlags = 0x2;
pub const MSG_DONTWAIT: SockMessageFlags = 0x40;
+
+ // shutdown flags
+ pub const SHUT_RD: c_int = 0;
+ pub const SHUT_WR: c_int = 1;
+ pub const SHUT_RDWR: c_int = 2;
}
// Not all of these constants exist on freebsd
@@ -177,4 +182,9 @@ mod os {
pub const MSG_OOB: SockMessageFlags = 0x1;
pub const MSG_PEEK: SockMessageFlags = 0x2;
pub const MSG_DONTWAIT: SockMessageFlags = 0x80;
+
+ // shutdown flags
+ pub const SHUT_RD: c_int = 0;
+ pub const SHUT_WR: c_int = 1;
+ pub const SHUT_RDWR: c_int = 2;
}