Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/devices/src/virtio/vhost_user_backend/connection/sys/windows.rs
5394 views
1
// Copyright 2022 The ChromiumOS Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
use std::pin::Pin;
6
7
use base::RawDescriptor;
8
use cros_async::Executor;
9
use futures::Future;
10
11
use crate::virtio::vhost_user_backend::connection::VhostUserConnectionTrait;
12
use crate::virtio::vhost_user_backend::handler::VhostUserDevice;
13
14
/// TODO implement this. On Windows the `vhost_user_tube` can be provided through the `path`
15
/// constructor string, and the future returned by `run_backend` can be listened to alonside the
16
/// close and exit events.
17
pub struct VhostUserListener;
18
pub struct VhostUserStream;
19
20
impl VhostUserConnectionTrait for VhostUserListener {
21
fn run_req_handler<'e>(
22
self,
23
_handler: Box<dyn vmm_vhost::Backend>,
24
_ex: &'e Executor,
25
) -> Pin<Box<dyn Future<Output = anyhow::Result<()>> + 'e>> {
26
todo!()
27
}
28
}
29
30
impl VhostUserConnectionTrait for VhostUserStream {
31
fn run_req_handler<'e>(
32
self,
33
_handler: Box<dyn vmm_vhost::Backend>,
34
_ex: &'e Executor,
35
) -> Pin<Box<dyn Future<Output = anyhow::Result<()>> + 'e>> {
36
todo!()
37
}
38
}
39
40