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 364 of file NetworkSubsystem.cpp.

366{
367 std::unique_lock lock(m_callbacks_mutex);
368 m_endpoint_callbacks[endpoint_id] = std::move(callback);
369}
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().