pub fn get_launch_activate_tcp_listener(name: &str, nonblock: bool) -> io::Result<TcpListener> {
    let fd = get_launch_activate_socket(name)?;
    debug!("created TCP listener from launch activate socket {}", fd);
    let listener = unsafe { TcpListener::from_raw_fd(fd) };
    if nonblock {
        listener.set_nonblocking(true)?;
    }
    Ok(listener)
}
Get a macOS launch active socket as a `TcpListener`
crates/shadowsocks-service/src/net/launch_activate_socket.rs