pub struct VhostUserDaemon<S, V, B: Bitmap + 'static = ()> { /* private fields */ }
Expand description

Implement a simple framework to run a vhost-user service daemon.

This structure is the public API the backend is allowed to interact with in order to run a fully functional vhost-user daemon.

Implementations

Create the daemon instance, providing the backend implementation of VhostUserBackend.

Under the hood, this will start a dedicated thread responsible for listening onto registered event. Those events can be vring events or custom events from the backend, but they get to be registered later during the sequence.

Connect to the vhost-user socket and run a dedicated thread handling all requests coming through this socket. This runs in an infinite loop that should be terminating once the other end of the socket (the VMM) hangs up.

Listen to the vhost-user socket and run a dedicated thread handling all requests coming through this socket.

This runs in an infinite loop that should be terminating once the other end of the socket (the VMM) disconnects.

Wait for the thread handling the vhost-user socket connection to terminate.

Retrieve the vring epoll handler.

This is necessary to perform further actions like registering and unregistering some extra event file descriptors.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.