MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_endpoint_receive_callback

std::function<void(uint64_t endpoint_id, std::function<void(uint64_t, const uint8_t*, size_t, std::string_view)> callback)> MayaFlux::Registry::Service::NetworkService::set_endpoint_receive_callback

Register a per-endpoint receive callback.

Parameters
endpoint_idEndpoint to listen on.
callbackCalled on the backend's receive thread.

Overrides any previously registered callback for this endpoint. For endpoints opened with EndpointRole::SEND this is a no-op.

Thread safety: the callback fires on the backend's receive thread. If the consumer needs to bridge to a different thread (audio callback, coroutine scheduler), it must handle that in the callback body (e.g., push into a lock-free queue, set an atomic flag).

Definition at line 134 of file NetworkService.hpp.

Referenced by MayaFlux::Core::InputManager::setup_osc_bridge(), and MayaFlux::Vruta::NetworkSource::~NetworkSource().