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:289
Describes one logical send/receive endpoint managed by a backend.

Definition at line 303 of file Chronie.cpp.

307{
308 auto source = std::make_shared<Vruta::NetworkSource>(info);
309 on_network_message(source, std::move(callback), std::move(name));
310 return source;
311}

References on_network_message().

+ Here is the call graph for this function: