template <>

class WireServer

Defined at line 6171 of file fidling/gen/sdk/fidl/fuchsia.hardware.network/fuchsia.hardware.network/cpp/fidl/fuchsia.hardware.network/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

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

<

::fuchsia_hardware_network::Session>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_network::Session>|).

Public Methods

void Attach (::fuchsia_hardware_network::wire::SessionAttachRequest * request, AttachCompleter::Sync & completer)

Attaches the session to `port`.

Once attached, the session starts to receive the subscribed frames over

the data FIFOs and it may send frames destined to the specified `port`.

+ request `port` port to subscribe to.

+ request `rx_frames` Frame types of interest on the port.

* error `ZX_ERR_NOT_FOUND` if `port` is not valid.

* error `ZX_ERR_INVALID_ARGS` if `rx_frames` is not a subset of the

port's supported frames.

* error `ZX_ERR_ALREADY_BOUND` if `port` is already attached.

void Detach (::fuchsia_hardware_network::wire::SessionDetachRequest * request, DetachCompleter::Sync & completer)

Detaches the session from `port`.

Once detached, the session stops receiving frames from `port`. Frames

sent to a detached port may be returned with an error. It is not

necessary to call `Detach` on ports that are removed from the device,

doing so causes `ZX_ERR_NOT_FOUND` to be returned.

+ request `port` port to subscribe to.

* error `ZX_ERR_NOT_FOUND` if the session is not currently attached to

the port.

void Close (CloseCompleter::Sync & completer)

Cleanly closes a session.

This will cause the session to send a `ZX_ERR_CANCELLED` epitaph and

proceed to close the Session channel. Clients may only assume that they

own all the buffers that are currently owned by the session (sent over

either the rx or tx FIFOs) once the epitaph is received. Closing the rx

or tx FIFO is equivalent to calling `Close`.

void WatchDelegatedRxLease (WatchDelegatedRxLeaseCompleter::Sync & completer)

Watchers for delegated receive wakeup leases.

Calls block until a lease is delegated by the device. If a call to

`WatchDelegatedRxLease` is made while a previous call is blocking, the

session is closed with `ZX_ERR_BAD_STATE`. Will never yield any values

for sessions created without [`SessionFlags.RECEIVE_RX_POWER_LEASES`].

Given a single lease is assumed sufficient to keep the system awake, the

server only keeps a single lease in its buffer. If a new delegated lease

becomes available and the client hasn't popped the previous one with a

call to `WatchDelegatedRxLease`, the server drops the previously pending

lease.

See [`DelegatedRxLease`] for how to handle delegated leases.

void WireServer ()

Defined at line 6174 of file fidling/gen/sdk/fidl/fuchsia.hardware.network/fuchsia.hardware.network/cpp/fidl/fuchsia.hardware.network/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 6175 of file fidling/gen/sdk/fidl/fuchsia.hardware.network/fuchsia.hardware.network/cpp/fidl/fuchsia.hardware.network/cpp/wire_messaging.h