template <typename Protocol>
struct Endpoints
Defined at line 201 of file ../../sdk/lib/fidl_driver/include/lib/fidl_driver/cpp/transport.h
Public Members
fdf::ClientEnd<Protocol> client
fdf::ServerEnd<Protocol> server
Public Methods
Endpoints<Protocol> Create ()
Creates a pair of fdf channel endpoints speaking the |Protocol| protocol.
Whenever interacting with FIDL, using this method should be encouraged over
|fdf::ChannelPair::Create|, because this method encodes the precise protocol type
into its results at compile time.
The return value is struct containing client and server endpoints.
Given the following:
auto endpoints = fdf::Endpoints
<MyProtocol
>::Create();
The channel endpoints may be accessed via:
endpoints->client;
endpoints->server;
Or you may use structured bindings to gain access:
auto [client_end, server_end] = fdf::Endpoints
<MyProtocol
>::Create();
Defined at line 223 of file ../../sdk/lib/fidl_driver/include/lib/fidl_driver/cpp/transport.h
fdf::ServerEnd<Protocol> Create (fdf::ClientEnd<Protocol> * out_client)
Creates a pair of Zircon channel endpoints speaking the |Protocol| protocol.
Whenever interacting with FIDL, using this method should be encouraged over
|fdf::ChannelPair::Create|, because this method encodes the precise protocol type
into its results at compile time.
This overload of |Create| may lead to more concise code when the
caller already has the client endpoint defined as an instance variable.
It will replace the destination of |out_client| with a newly created client
endpoint, and return the corresponding server endpoint:
// |client_end_| is an instance variable.
auto server_end = fdf::Endpoints
<Protocol
>::Create(
&client
_end_);
Defined at line 244 of file ../../sdk/lib/fidl_driver/include/lib/fidl_driver/cpp/transport.h
fdf::ClientEnd<Protocol> Create (fdf::ServerEnd<Protocol> * out_server)
Creates a pair of Zircon channel endpoints speaking the |Protocol| protocol.
Whenever interacting with FIDL, using this method should be encouraged over
|fdf::ChannelPair::Create|, because this method encodes the precise protocol type
into its results at compile time.
This overload of |Create| may lead to more concise code when the
caller already has the server endpoint defined as an instance variable.
It will replace the destination of |out_server| with a newly created server
endpoint, and return the corresponding client endpoint:
// |server_end_| is an instance variable.
auto client_end = fdf::Endpoints
<Protocol
>::Create(
&server
_end_);
Defined at line 261 of file ../../sdk/lib/fidl_driver/include/lib/fidl_driver/cpp/transport.h