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

◆ set_endpoint_receive_callback()

void MayaFlux::Core::NetworkSubsystem::set_endpoint_receive_callback ( uint64_t  endpoint_id,
NetworkReceiveCallback  callback 
)

Register a per-endpoint receive callback.

Stored locally and invoked from the backend's receive callback after endpoint routing.

Definition at line 358 of file NetworkSubsystem.cpp.

360{
361 std::unique_lock lock(m_callbacks_mutex);
362 m_endpoint_callbacks[endpoint_id] = std::move(callback);
363}
std::unordered_map< uint64_t, NetworkReceiveCallback > m_endpoint_callbacks
std::shared_mutex m_callbacks_mutex
Per-endpoint receive callbacks set by consumers via set_endpoint_receive_callback().