class SynchronousProxy

Defined at line 23 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/internal/synchronous_proxy.h

Manages the client state for a synchronous interface.

A |SynchronousProxy| manages the client state for a sychronous interface.

This object validates messages before sending them to the remote endpoint,

and (optionally) blocks until it receives a reply.

Instances of this class are thread-safe.

Public Methods

void SynchronousProxy (zx::channel channel)

Creates a |SynchronousProxy| that wraps the given channel.

Defined at line 15 of file ../../sdk/lib/fidl/hlcpp/internal/synchronous_proxy.cc

void ~SynchronousProxy ()

Defined at line 17 of file ../../sdk/lib/fidl/hlcpp/internal/synchronous_proxy.cc

zx::channel TakeChannel ()

Returns the underlying channel from this object.

The |SynchronousProxy| does not attempt to synchronize this operation with

|Send| or |Call|.

Defined at line 19 of file ../../sdk/lib/fidl/hlcpp/internal/synchronous_proxy.cc

zx_status_t Send (const fidl_type_t * type, HLCPPOutgoingMessage message)

Validates that |message| matches the given |type| and sends the message

through the underlying channel.

Does not block.

Returns an error if validation or writing fails.

Defined at line 21 of file ../../sdk/lib/fidl/hlcpp/internal/synchronous_proxy.cc

zx_status_t Call (const fidl_type_t * request_type, const fidl_type_t * response_type, HLCPPOutgoingMessage request, HLCPPIncomingMessage * response)

Validate that |request| matches the given |request_type| and sends

|request| through the underlying channel. Blocks until it receives a

response, which is then decoded according to |response_type| and returned

in |response_type|.

Blocks until the remote endpoint replied.

Returns an error if validation, writing, reading, or decoding fails.

Defined at line 25 of file ../../sdk/lib/fidl/hlcpp/internal/synchronous_proxy.cc

const zx::channel & channel ()

The underlying channel.

Defined at line 55 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/internal/synchronous_proxy.h