template <>

class WireServer

Defined at line 3293 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/cpp/fidl/fuchsia.web/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_web::MessagePort>|

and |::fidl::ServerEnd

<

::fuchsia_web::MessagePort>|).

Public Methods

void PostMessage (::fuchsia_web::wire::MessagePortPostMessageRequest * request, PostMessageCompleter::Sync & completer)

Sends a [`WebMessage`] to the peer. These are processed in order, one at a

time. It is not necessary for the caller to wait for the completion callback before calling

[`MessagePort.PostMessage`] again.

If an error occurred, the [`FrameError`] will be set to one of these value:

- `BUFFER_NOT_UTF8`: The script in `message`'s `data` property is not UTF-8 encoded.

- `NO_DATA_IN_MESSAGE`: The `data` property is missing in `message`.

void ReceiveMessage (ReceiveMessageCompleter::Sync & completer)

Asynchronously reads the next message from the channel. The client should invoke the

callback when it is ready to process another message. Unreceived messages are buffered

on the sender's side and bounded by its available resources.

void WireServer ()

Defined at line 3296 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/cpp/fidl/fuchsia.web/cpp/wire_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 ~WireServer ()

Defined at line 3297 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/cpp/fidl/fuchsia.web/cpp/wire_messaging.h