Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AsyncFd::(set_)socket_option #106

Merged
merged 6 commits into from
Mar 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Silence cast-sign-loss Clippy warning
There are no valid negative socket levels or option names.
  • Loading branch information
Thomasdezeeuw committed Mar 30, 2024
commit cee89208cc1f106bef21691ff964baf11269c966
2 changes: 2 additions & 0 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ impl AsyncFd {
///
/// The caller must ensure that `T` is the valid type for the option.
#[doc(alias = "getsockopt")]
#[allow(clippy::cast_sign_loss)] // No valid negative level or optnames.
pub fn socket_option<'fd, T>(
&'fd self,
level: libc::c_int,
Expand All @@ -371,6 +372,7 @@ impl AsyncFd {
///
/// The caller must ensure that `T` is the valid type for the option.
#[doc(alias = "setsockopt")]
#[allow(clippy::cast_sign_loss)] // No valid negative level or optnames.
pub fn set_socket_option<'fd, T>(
&'fd self,
level: libc::c_int,
Expand Down
Loading