mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: funnel VM memory via additional connections abstraction
At this point, we are still only using a single connection. On-behalf-of: SAP sebastian.eydam@sap.com Signed-off-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>
This commit is contained in:
@@ -72,6 +72,22 @@ impl ReceiveListener {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
/// Tries to clone a [`ReceiveListener`].
|
||||
pub(crate) fn try_clone(&self) -> Result<Self, MigratableError> {
|
||||
match self {
|
||||
ReceiveListener::Tcp(listener) => listener
|
||||
.try_clone()
|
||||
.map(ReceiveListener::Tcp)
|
||||
.context("Failed to clone TCP listener")
|
||||
.map_err(MigratableError::MigrateReceive),
|
||||
ReceiveListener::Unix(listener) => listener
|
||||
.try_clone()
|
||||
.map(ReceiveListener::Unix)
|
||||
.context("Failed to clone Unix listener")
|
||||
.map_err(MigratableError::MigrateReceive),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AsFd for ReceiveListener {
|
||||
|
||||
Reference in New Issue
Block a user