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:
Sebastian Eydam
2026-03-12 14:30:43 +01:00
committed by Bo Chen
parent 07484abd35
commit 55e6971c47
2 changed files with 97 additions and 30 deletions
+16
View File
@@ -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 {