pub struct ConnectorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ConnectorSynchronousProxy
impl ConnectorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ConnectorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ConnectorEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn connect(
&self,
remote_cid: u32,
remote_port: u32,
con: ConnectionTransport,
___deadline: MonotonicInstant,
) -> Result<ConnectorConnectResult, Error>
pub fn connect( &self, remote_cid: u32, remote_port: u32, con: ConnectionTransport, ___deadline: MonotonicInstant, ) -> Result<ConnectorConnectResult, Error>
Attempt to establish a connection to the specified remote cid/port pair. No local port is specified as an ephemeral one will automatically be allocated.
Sourcepub fn listen(
&self,
local_port: u32,
acceptor: ClientEnd<AcceptorMarker>,
___deadline: MonotonicInstant,
) -> Result<ConnectorListenResult, Error>
pub fn listen( &self, local_port: u32, acceptor: ClientEnd<AcceptorMarker>, ___deadline: MonotonicInstant, ) -> Result<ConnectorListenResult, Error>
Registers a listener for a local port. There can only be one listener for a single port at a time.
Sourcepub fn bind(
&self,
remote_cid: u32,
local_port: u32,
listener: ServerEnd<ListenerMarker>,
___deadline: MonotonicInstant,
) -> Result<ConnectorBindResult, Error>
pub fn bind( &self, remote_cid: u32, local_port: u32, listener: ServerEnd<ListenerMarker>, ___deadline: MonotonicInstant, ) -> Result<ConnectorBindResult, Error>
Registers a listener for a local port. There can only be one listener for a single port at a time.
Sourcepub fn get_cid(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
pub fn get_cid(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
Query the current context id of the system. The local CID is should not
necessary in interactions with the same device; instead you may pass
VMADDR_CID_LOCAL
, which will alias to local CID this returns. The cid returned
by this method is useful for debugging or if you have some other communication
channel to a different host and you would like to send them your CID to then
establish a vsock connection on.
Trait Implementations§
Source§impl Debug for ConnectorSynchronousProxy
impl Debug for ConnectorSynchronousProxy
Source§impl From<Channel> for ConnectorSynchronousProxy
impl From<Channel> for ConnectorSynchronousProxy
Source§impl From<ConnectorSynchronousProxy> for Handle
impl From<ConnectorSynchronousProxy> for Handle
Source§fn from(value: ConnectorSynchronousProxy) -> Self
fn from(value: ConnectorSynchronousProxy) -> Self
Source§impl SynchronousProxy for ConnectorSynchronousProxy
impl SynchronousProxy for ConnectorSynchronousProxy
Source§type Proxy = ConnectorProxy
type Proxy = ConnectorProxy
Source§type Protocol = ConnectorMarker
type Protocol = ConnectorMarker
Proxy
controls.