pub enum HostVsockEndpointRequest {
Listen {
port: u32,
acceptor: ClientEnd<HostVsockAcceptorMarker>,
responder: HostVsockEndpointListenResponder,
},
Connect {
guest_port: u32,
responder: HostVsockEndpointConnectResponder,
},
}
Expand description
Exposed by a host to provide the ability for listeners to be multiplexed by port and to manage dynamic port allocation for outbound connections.
Variants§
Listen
Instructs the device to listen for guest initiated connections to a given port by
using acceptor
when the guest creates a connection.
Possible errors: - ZX_ERR_ALREADY_BOUND: A client is already listening on this port.
Connect
Attempts to create a vsock connection to a guest on ‘guest_port’. Uses a dynamically chosen ephemeral host port.
Possible errors: - ZX_ERR_NO_RESOURCES: The device couldn’t allocate an unused host port. - ZX_ERR_CONNECTION_REFUSED: The guest refused this connection.
Other errors are related to socket creation, see zx_socket_create
Implementations§
Source§impl HostVsockEndpointRequest
impl HostVsockEndpointRequest
pub fn into_listen( self, ) -> Option<(u32, ClientEnd<HostVsockAcceptorMarker>, HostVsockEndpointListenResponder)>
pub fn into_connect(self) -> Option<(u32, HostVsockEndpointConnectResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostVsockEndpointRequest
impl !RefUnwindSafe for HostVsockEndpointRequest
impl Send for HostVsockEndpointRequest
impl Sync for HostVsockEndpointRequest
impl Unpin for HostVsockEndpointRequest
impl !UnwindSafe for HostVsockEndpointRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more