Struct dbs_upcall::UpcallClient
source · pub struct UpcallClient<S: UpcallClientService + Send> { /* private fields */ }
Expand description
Upcall client’s Implementation.
Implementations§
source§impl<S: UpcallClientService + Send + 'static> UpcallClient<S>
impl<S: UpcallClientService + Send + 'static> UpcallClient<S>
sourcepub fn new(
connector: VsockInnerConnector,
epoll_manager: EpollManager,
service: S
) -> Result<Self>
pub fn new( connector: VsockInnerConnector, epoll_manager: EpollManager, service: S ) -> Result<Self>
Create a new Upcall Client instance.
sourcepub fn send_request(
&self,
request: UpcallClientRequest,
callback: Box<dyn Fn(UpcallClientResponse) + Send>
) -> Result<()>
pub fn send_request( &self, request: UpcallClientRequest, callback: Box<dyn Fn(UpcallClientResponse) + Send> ) -> Result<()>
Send request to upcall server, and get the response from callback function.
sourcepub fn send_request_without_result(
&self,
request: UpcallClientRequest
) -> Result<()>
pub fn send_request_without_result( &self, request: UpcallClientRequest ) -> Result<()>
Only send request to upcall server, and discard the response.
sourcepub fn get_state(&self) -> UpcallClientState
pub fn get_state(&self) -> UpcallClientState
Get the link state of upcall client.