We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7c82f7 commit 1c67209Copy full SHA for 1c67209
src/socket.rs
@@ -1182,7 +1182,7 @@ impl Socket {
1182
target_os = "illumos",
1183
)))]
1184
pub fn set_tos(&self, tos: u32) -> io::Result<()> {
1185
- unsafe { setsockopt(self.inner, sys::IPPROTO_IP, sys::IP_TOS, tos as c_int) }
+ unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS, tos as c_int) }
1186
}
1187
1188
/// Get the value of the `IP_TOS` option for this socket.
@@ -1200,7 +1200,7 @@ impl Socket {
1200
1201
pub fn tos(&self) -> io::Result<u32> {
1202
unsafe {
1203
- getsockopt::<c_int>(self.inner, sys::IPPROTO_IP, sys::IP_TOS).map(|tos| tos as u32)
+ getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS).map(|tos| tos as u32)
1204
1205
1206
0 commit comments