template <>

class Server

Defined at line 3360 of file fidling/gen/sdk/fidl/fuchsia.virtualization/fuchsia.virtualization/cpp/fidl/fuchsia.virtualization/cpp/natural_messaging.h

Public Methods

void Listen (ListenRequest & request, ListenCompleter::Sync & completer)

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 (ConnectRequest & request, ConnectCompleter::Sync & completer)

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)

void Server ()

Defined at line 3363 of file fidling/gen/sdk/fidl/fuchsia.virtualization/fuchsia.virtualization/cpp/fidl/fuchsia.virtualization/cpp/natural_messaging.h

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~Server ()

Defined at line 3364 of file fidling/gen/sdk/fidl/fuchsia.virtualization/fuchsia.virtualization/cpp/fidl/fuchsia.virtualization/cpp/natural_messaging.h