template <>

class WireSyncClientImpl

Defined at line 1993 of file fidling/gen/sdk/fidl/fuchsia.net.tun/fuchsia.net.tun/cpp/fidl/fuchsia.net.tun/cpp/wire_messaging.h

Methods to make a sync FIDL call directly on an unowned handle or a

const reference to a |::fidl::ClientEnd

<

::fuchsia_net_tun::Device>|,

avoiding setting up a client.

Public Methods

::fidl::WireResult< ::fuchsia_net_tun::Device::WriteFrame> WriteFrame (::fuchsia_net_tun::wire::Frame frame)

Writes a frame to the device (data coming from network-end).

If the device was created with the

[`fuchsia.net.tun/DeviceConfig.blocking`] option set to `true`, calls to

`WriteFrame` block until there is one buffer available to fulfill the

request.

+ request `frame` inbound frame data and metadata.

* error `ZX_ERR_NOT_FOUND` if [`Frame.port`] references an unknown port.

* error `ZX_ERR_INVALID_ARGS` if `frame` is invalid.

* error `ZX_ERR_BAD_STATE` if the device is offline.

* error `ZX_ERR_NO_RESOURCES` if more than

[`fuchsia.net.tun/MAX_PENDING_OPERATIONS`] calls to `WriteFrame` are

pending.

* error `ZX_ERR_SHOULD_WAIT` if `blocking` is set to `false` and there

are no buffers available to fulfill the request.

Allocates 32 bytes of response buffer on the stack. Request is heap-allocated.

::fidl::WireResult< ::fuchsia_net_tun::Device::ReadFrame> ReadFrame ()

Gets the next frame from the device (data coming from host-end).

If the device was created with the

[`fuchsia.net.tun/DeviceConfig.blocking`] option set to `true`, calls to

`ReadFrame` block until there is a frame available to be read.

- response `frame` outbound frame data and metadata.

* error `ZX_ERR_NO_RESOURCES` if more than

[`fuchsia.net.tun/MAX_PENDING_OPERATIONS`] calls to `ReadFrame` are

pending.

* error `ZX_ERR_SHOULD_WAIT` if `blocking` is set to `false` and there

are no frames to be read.

Allocates 16 bytes of request buffer on the stack. Response is heap-allocated.

::fidl::WireResult< ::fuchsia_net_tun::Device::GetSignals> GetSignals ()

Retrieves signals eventpair.

- response `signals` an eventpair that is signalled with

`SIGNAL_READABLE` and `SIGNAL_WRITABLE` when read and write buffers are

available, respectively.

Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.

::fidl::OneWayStatus AddPort (::fuchsia_net_tun::wire::DevicePortConfig config, ::fidl::ServerEnd< ::fuchsia_net_tun::Port> && port)

Creates a new port on this device.

+ request `config` new port configuration.

+ request `port` grants control over the port. Closed with an epitaph if

`config` is not valid.

Allocates 232 bytes of message buffer on the stack. No heap allocation necessary.

::fidl::OneWayStatus GetDevice (::fidl::ServerEnd< ::fuchsia_hardware_network::Device> && device)

Connects to the underlying device endpoint.

+ request `device` device handle.

Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.

::fidl::OneWayStatus DelegateRxLease (::fuchsia_hardware_network::wire::DelegatedRxLease lease)

Delegates an rx lease through the tun device.

See documentation on [`fuchsia.hardware.network/DelegatedRxLease`] for

proper usage.

Allocates 88 bytes of message buffer on the stack. No heap allocation necessary.