diff options
| author | bors <bors@rust-lang.org> | 2014-03-13 21:06:34 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-13 21:06:34 -0700 |
| commit | 4443fb3cfa945cf7cb791cf8f2ec81b7faf25132 (patch) | |
| tree | c8f6ce3665e52cee6b0bff3a55aa0116a61af1c6 /src/libstd/libc.rs | |
| parent | 98fa0f89b1cd406594bedc5803a1b6db53990a15 (diff) | |
| parent | a63deeb3d32fc21f36d484d62a3ea1d3d0c82500 (diff) | |
auto merge of #12855 : alexcrichton/rust/shutdown, r=brson
This is something that is plausibly useful, and is provided by libuv. This is not currently surfaced as part of the `TcpStream` type, but it may possibly appear in the future. For now only the raw functionality is provided through the Rtio objects.
Diffstat (limited to 'src/libstd/libc.rs')
| -rw-r--r-- | src/libstd/libc.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index c602c2fc27f..cfa4a2deb2f 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -1611,6 +1611,10 @@ pub mod consts { pub static SO_KEEPALIVE: c_int = 8; pub static SO_BROADCAST: c_int = 32; pub static SO_REUSEADDR: c_int = 4; + + pub static SHUT_RD: c_int = 0; + pub static SHUT_WR: c_int = 1; + pub static SHUT_RDWR: c_int = 2; } pub mod extra { use libc::types::os::arch::c95::c_int; @@ -2391,6 +2395,10 @@ pub mod consts { pub static SO_KEEPALIVE: c_int = 9; pub static SO_BROADCAST: c_int = 6; pub static SO_REUSEADDR: c_int = 2; + + pub static SHUT_RD: c_int = 0; + pub static SHUT_WR: c_int = 1; + pub static SHUT_RDWR: c_int = 2; } #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")] @@ -2842,6 +2850,10 @@ pub mod consts { pub static SO_KEEPALIVE: c_int = 0x0008; pub static SO_BROADCAST: c_int = 0x0020; pub static SO_REUSEADDR: c_int = 0x0004; + + pub static SHUT_RD: c_int = 0; + pub static SHUT_WR: c_int = 1; + pub static SHUT_RDWR: c_int = 2; } pub mod extra { use libc::types::os::arch::c95::c_int; @@ -3221,6 +3233,10 @@ pub mod consts { pub static SO_KEEPALIVE: c_int = 0x0008; pub static SO_BROADCAST: c_int = 0x0020; pub static SO_REUSEADDR: c_int = 0x0004; + + pub static SHUT_RD: c_int = 0; + pub static SHUT_WR: c_int = 1; + pub static SHUT_RDWR: c_int = 2; } pub mod extra { use libc::types::os::arch::c95::c_int; @@ -3918,6 +3934,7 @@ pub mod funcs { pub fn sendto(socket: c_int, buf: *c_void, len: size_t, flags: c_int, addr: *sockaddr, addrlen: socklen_t) -> ssize_t; + pub fn shutdown(socket: c_int, how: c_int) -> c_int; } } @@ -3954,6 +3971,7 @@ pub mod funcs { pub fn sendto(socket: SOCKET, buf: *c_void, len: c_int, flags: c_int, addr: *sockaddr, addrlen: c_int) -> c_int; + pub fn shutdown(socket: SOCKET, how: c_int) -> c_int; } } |
