class HostVsockEndpoint
Defined at line 9117 of file fidling/gen/sdk/fidl/fuchsia.virtualization/fuchsia.virtualization/hlcpp/fuchsia/virtualization/cpp/fidl.h
Exposed by a host to provide the ability for listeners to be multiplexed by
port and to manage dynamic port allocation for outbound connections.
Public Members
static const char[] Name_
Public Methods
void ~HostVsockEndpoint ()
void Listen (uint32_t port, ::fidl::InterfaceHandle< ::fuchsia::virtualization::HostVsockAcceptor> acceptor, ListenCallback callback)
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.
void Connect (uint32_t guest_port, ConnectCallback callback)
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](https://fuchsia.dev/fuchsia-src/reference/syscalls/socket_create.md)