INNER CODE UNIT · Rust

spawn_grpc_server

upvpn/upvpn-app · upvpn-controller/src/lib.rs:60

pub async fn spawn_grpc_server<S, P, F>(
    service: S,
    auth: P,
    shutdown: F,
) -> std::result::Result<GrpcServerJoinHandle, ControllerError>
where
    S: proto::controller_service_server::ControllerService,
    F: Future<Output = ()> + Send + 'static,
    P: Auth + 'static,
{
    use futures::stream::TryStreamExt;
    use parity_tokio_ipc::SecurityAttributes;

    let socket_path = upvpn_config::config().socket_path();

    let mut endpoint = IpcEndpoint::new(socket_path.to_string_lossy().to_string());
    endpoint.set_security_attributes(
        SecurityAttributes::allow_everyone_create()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…