Helper for working with Unix Domain Socket ancilliary control messages.
A library for working with ancilliary control messages for Unix Domain Sockets as described by cmsg.
# Cargo.toml
[dependencies]
bytes = "0.4"
cmsg = "0.1"
To process received control messages, cmsg::iterator()
is used to
create an iterator adapter over the raw bytes received fromlibc::recvmsg
.
To create control messages, cmsg::builder()
is used to create a
builder interface over the top of pre-allocated storage. UsingVec<u8>
, bytes::BytesMut
, and stack-based arrays, viastd:
are supported. The builder checks that the storages:Cursor
is correctly aligned and maintains alignment of each appended message.
cmsg-rs
is primarily distributed under the terms of the MIT license.
See LICENSE-MIT for details.