Backlog for HorizonOS UnixListener
This commit is contained in:
parent
be00c5a9b8
commit
7a7bb3ef85
1 changed files with 8 additions and 2 deletions
|
@ -73,7 +73,12 @@ impl UnixListener {
|
||||||
unsafe {
|
unsafe {
|
||||||
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
|
let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
|
||||||
let (addr, len) = sockaddr_un(path.as_ref())?;
|
let (addr, len) = sockaddr_un(path.as_ref())?;
|
||||||
#[cfg(any(target_os = "windows", target_os = "redox", target_os = "espidf"))]
|
#[cfg(any(
|
||||||
|
target_os = "windows",
|
||||||
|
target_os = "redox",
|
||||||
|
target_os = "espidf",
|
||||||
|
target_os = "horizon"
|
||||||
|
))]
|
||||||
const backlog: libc::c_int = 128;
|
const backlog: libc::c_int = 128;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
const backlog: libc::c_int = -1;
|
const backlog: libc::c_int = -1;
|
||||||
|
@ -83,7 +88,8 @@ impl UnixListener {
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
target_os = "openbsd",
|
target_os = "openbsd",
|
||||||
target_os = "espidf"
|
target_os = "espidf",
|
||||||
|
target_os = "horizon"
|
||||||
)))]
|
)))]
|
||||||
const backlog: libc::c_int = libc::SOMAXCONN;
|
const backlog: libc::c_int = libc::SOMAXCONN;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue