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

◆ on_network_message() [1/2]

MAYAFLUX_API std::shared_ptr< Vruta::NetworkSource > MayaFlux::on_network_message ( const Core::EndpointInfo info,
std::function< void(const Core::NetworkMessage &)>  callback,
std::string  name = "" 
)

Schedule an on_message handler, constructing the NetworkSource from config.

Parameters
infoEndpoint configuration used to open the source
callbackInvoked with each received message
nameOptional name for the event handler
Returns
Shared pointer to the opened NetworkSource (caller owns lifetime anchor)
[](const Core::NetworkMessage& msg) { });
void on_network_message(std::shared_ptr< Vruta::NetworkSource > source, std::function< void(const Core::NetworkMessage &)> callback, std::string name)
Schedule an on_message handler with an existing NetworkSource.
Definition Chronie.cpp:314
Describes one logical send/receive endpoint managed by a backend.

Definition at line 328 of file Chronie.cpp.

332{
333 auto source = std::make_shared<Vruta::NetworkSource>(info);
334 on_network_message(source, std::move(callback), std::move(name));
335 return source;
336}

References on_network_message().

+ Here is the call graph for this function: