Google is committed to advancing racial equity for Black communities. See how.

Protocols

A FIDL protocol groups methods and events to describe how one process interacts with another over a channel .

library fuchsia.examples;

const uint64 MAX_STRING_LENGTH = 32;

[Discoverable]
protocol Echo {
    EchoString(string:MAX_STRING_LENGTH value) -> (string:MAX_STRING_LENGTH response);
    SendString(string:MAX_STRING_LENGTH value);
    -> OnString(string:MAX_STRING_LENGTH response);
};

Protocol implementations are served from provider components using the outgoing directory and consumed from another component's namespace .

For example, the implementation of the fuchsia.examples.Echo protocol above would be present in a component's namespace at the path /svc/fuchsia.examples.Echo.

Routing

Protocols are routed to components through protocol capabilities.