template <>
class WireServer
Defined at line 1008 of file fidling/gen/sdk/fidl/fuchsia.net.tun/fuchsia.net.tun/cpp/fidl/fuchsia.net.tun/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_net_tun::Port>|
and |::fidl::ServerEnd
<
::fuchsia_net_tun::Port>|).
Public Methods
void GetState (GetStateCompleter::Sync & completer)
Gets the port internal state.
- response `state` a snapshot of the port's internal state.
void WatchState (WatchStateCompleter::Sync & completer)
Observes changes to internal state.
The first call always returns the current internal state, subsequent
calls block until the internal state differs from the last one returned
from a `WatchState` call.
`WatchState` does not provide full history of internal state changes. It
is possible that intermediary internal state changes are missed in
between `WatchState` calls.
- response `state` the latest observed port internal state.
void SetOnline (::fuchsia_net_tun::wire::PortSetOnlineRequest * request, SetOnlineCompleter::Sync & completer)
Sets the port's online status.
The online status is visible through
[`fuchsia.hardware.network/Port.GetStatus`]. Once `SetOnline` returns,
the status reported through `GetStatus` is guaranteed to be the one
passed to `SetOnline`.
+ request `online` desired port online state.
void GetPort (::fuchsia_net_tun::wire::PortGetPortRequest * request, GetPortCompleter::Sync & completer)
Connects to the underlying device port.
+ request `port` grants access to the device port.
void Remove (RemoveCompleter::Sync & completer)
Triggers port removal.
The client end will be closed once the server has completely cleaned up
all resources related to the port. This is equivalent to simply dropping
the client end, but provides callers with a signal of when removal is
complete, allowing port identifiers to be reused, for example.
void WireServer ()
Defined at line 1011 of file fidling/gen/sdk/fidl/fuchsia.net.tun/fuchsia.net.tun/cpp/fidl/fuchsia.net.tun/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 1012 of file fidling/gen/sdk/fidl/fuchsia.net.tun/fuchsia.net.tun/cpp/fidl/fuchsia.net.tun/cpp/wire_messaging.h