pub struct HvsockRelay { /* private fields */ }
Implementations§
Source§impl HvsockRelay
impl HvsockRelay
Sourcepub fn new(
driver: impl SpawnDriver,
vmbus: Arc<dyn ParentBus>,
guest: HvsockRelayChannelHalf,
hybrid_vsock_path: Option<PathBuf>,
hybrid_vsock_listener: Option<UnixListener>,
) -> Result<Self>
pub fn new( driver: impl SpawnDriver, vmbus: Arc<dyn ParentBus>, guest: HvsockRelayChannelHalf, hybrid_vsock_path: Option<PathBuf>, hybrid_vsock_listener: Option<UnixListener>, ) -> Result<Self>
Creates and starts a relay thread, waiting for hvsocket connect requests
on recv
.
Sourcepub fn connect(
&self,
ctx: &mut CancelContext,
service_id: Guid,
) -> impl Future<Output = Result<UnixStream>> + Send + use<>
pub fn connect( &self, ctx: &mut CancelContext, service_id: Guid, ) -> impl Future<Output = Result<UnixStream>> + Send + use<>
Connects to an hvsocket in the guest and returns a Unix socket that is relayed to the hvsocket.
Blocks until complete or cancelled.
Auto Trait Implementations§
impl Freeze for HvsockRelay
impl !RefUnwindSafe for HvsockRelay
impl Send for HvsockRelay
impl Sync for HvsockRelay
impl Unpin for HvsockRelay
impl !UnwindSafe for HvsockRelay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more