MayaFlux 0.5.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 339 of file NetworkSubsystem.cpp.

341{
342 std::unique_lock lock(m_callbacks_mutex);
343 m_endpoint_callbacks[endpoint_id] = std::move(callback);
344}
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().