Skip to content

Commit 695c73a

Browse files
APIs are unsupported on solid platform
1 parent edc8c74 commit 695c73a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • library/std/src/sys/net/connection/socket

library/std/src/sys/net/connection/socket/solid.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::ffi::CStr;
66
use crate::io::{self, BorrowedBuf, BorrowedCursor, ErrorKind, IoSlice, IoSliceMut};
77
use crate::net::{Shutdown, SocketAddr};
88
use crate::os::solid::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd};
9+
use crate::sys::pal::unsupported;
910
use crate::sys::{FromInner, IntoInner, abi};
1011
use crate::time::Duration;
1112
use crate::{cmp, mem, ptr, str};
@@ -331,13 +332,12 @@ impl Socket {
331332
Ok((val.l_onoff != 0).then(|| Duration::from_secs(val.l_linger as u64)))
332333
}
333334

334-
pub fn set_keepalive(&self, keepalive: bool) -> io::Result<()> {
335-
unsafe { setsockopt(self, netc::SOL_SOCKET, netc::SO_KEEPALIVE, keepalive as c_int) }
335+
pub fn set_keepalive(&self, _: bool) -> io::Result<()> {
336+
unsupported()
336337
}
337338

338339
pub fn keepalive(&self) -> io::Result<bool> {
339-
let raw: c_int = unsafe { getsockopt(self, netc::SOL_SOCKET, netc::SO_KEEPALIVE)? };
340-
Ok(raw != 0)
340+
unsupported()
341341
}
342342

343343
pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> {

0 commit comments

Comments
 (0)