class IncomingEventDispatcherBase
Defined at line 82 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/client_details.h
|IncomingEventDispatcher| decodes events and invokes the corresponding
methods in an event handler. It is the client side counterpart to the server
side |IncomingMessageDispatcher|.
On the server side, the server implementation would inherit from
|IncomingMessageDispatcher|, which decodes and invokes methods on the
subclass. Over on the client side, the event dispatcher and event handlers
are unrelated by inheritance, because the user may pass a |nullptr| event
handler to ignore all events.
Public Methods
fidl::Status DispatchEvent (fidl::IncomingHeaderAndMessage & msg, internal::MessageStorageViewBase * storage_view)
Dispatches an incoming event.
This should be implemented by the generated messaging layer. The default
implementation operates with the assumption that no events are defined in
the protocol.
## Handling events
If |event_handler| is null, the implementation should perform all the
checks that the message is valid and a recognized event, but not actually
invoke the event handler.
If |event_handler| is present, it should point to a event handler subclass
which corresponds to the protocol of |ClientImpl|. This constraint is
typically enforced when creating the client.
## Message ownership
If a matching event handler is found, |msg| is then consumed, regardless of
decoding error. Otherwise, |msg| is not consumed.
## Return value
Any errors during dispatching will be returned in a |fidl::Status|.
If not ok, bindings that support it should close the connection.
Defined at line 45 of file ../../sdk/lib/fidl/cpp/wire/client_details.cc
void IncomingEventDispatcherBase (BaseEventHandlerInterface * event_handler)
Defined at line 84 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/client_details.h
void ~IncomingEventDispatcherBase ()
Defined at line 87 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/client_details.h
BaseEventHandlerInterface * event_handler ()
Defined at line 117 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/client_details.h