#byte #read #file-descriptor #read-file #syscalls #ioctl #queue

fionread

The fionread IO control reads the number of bytes available to read from the file descriptor

2 releases

0.1.1 Jun 30, 2022
0.1.0 Feb 16, 2022

#20 in #ioctl

Download history 36/week @ 2024-03-11 23/week @ 2024-03-18 30/week @ 2024-03-25 77/week @ 2024-04-01 15/week @ 2024-04-08 42/week @ 2024-04-15 33/week @ 2024-04-22 15/week @ 2024-04-29 63/week @ 2024-05-06 61/week @ 2024-05-13 17/week @ 2024-05-20 9/week @ 2024-05-27 14/week @ 2024-06-03 15/week @ 2024-06-10 18/week @ 2024-06-17 22/week @ 2024-06-24

70 downloads per month
Used in 3 crates (via breadx)

MIT AND Apache-2.0

9KB
124 lines

fionread

crates.io Documentation Build Status

This crate provides an abstraction over the FIONREAD ioctl. This is used to tell how many bytes are in the read queue for a given socket.

This is an "unsafe-quarantine microcrate", since I want breadx to be able to be forbid(unsafe_code), and it seems a little silly to throw that away for a single syscall that probably won't be used that often in the common case. That's not to say that this may not be useful elsewhere.

MSRV is currently 1.46.0. This MSRV will not change without a minor version bump.

Licensing

Licensed under the MIT and Apache 2.0 licenses, just like Rust proper is.

Dependencies

~2–13MB
~132K SLoC