udplite
A Rust library for using UDP-Lite sockets. (RFC 3828)
extern crate udplite;
let socket = bind.expect;
socket.set_send_checksum_coverage.expect;
socket.connect.expect;
socket.send.expect;
This crate is a work in progress.
Supported operating systems
UDP-Lite is only implemented by Linux and FreeBSD.
Whether Android supports it I'm not sure about: The kernel has the constants, but some of them are missing from bionic (the Android libc). (only IPPROTO_UDPLITE is present)
The FreeBSD implementation also behaves strangely: sent packets that are not entirely covered completely by the checksum (UDPLITE_SEND_CSCOV) seems to be discarded by the OS. (meanwhile such packets sent from Linux are received)
mio integration
Like UDP sockets, UDP-Lite sockets can be registered with epoll / kqueue, and therefore used with mio. This feature is not enabled by default; enable it in Cargo.toml with:
[]
= {="0.1.0", =["mio_07"]}
Also remember to enable nonblocking mode for the sockets. (UdpLiteSocket.set_nonblocking(true))
Minimum supported Rust version
The minimum supported Rust version is 1.36.
Older versions might currently work, but I plan to use std::io::IoSlice.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.