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

◆ initialize()

MAYAFLUX_API bool MayaFlux::Portal::Network::initialize ( Registry::Service::NetworkService service)

Initialize Portal::Network.

Parameters
servicePointer to the registered NetworkService.
Returns
true if initialization succeeded.

Must be called after NetworkSubsystem has started and registered its NetworkService into BackendRegistry. Sequence mirrors Portal::Graphics::initialize(backend).

Initializes, in order:

  • NetworkFoundry (endpoint resource authority) [not yet implemented]
  • StreamForge (stream lifecycle and schema) [not yet implemented]
  • PacketFlow (serialization and dispatch) [not yet implemented]

Today this is a stub. The function signature and call site are established so the engine init sequence does not need to change when the singletons are added.

Definition at line 11 of file Network.cpp.

12{
13 if (g_initialized) {
14 MF_WARN(Journal::Component::Portal, Journal::Context::Networking,
15 "Portal::Network already initialized");
16 return true;
17 }
18
19 if (!service) {
20 MF_ERROR(Journal::Component::Portal, Journal::Context::Networking,
21 "Cannot initialize Portal::Network: NetworkService is null");
22 return false;
23 }
24
25 // NetworkFoundry::instance().initialize(service);
26 // StreamForge::instance().initialize();
27 // PacketFlow::instance().initialize();
28
29 g_initialized = true;
30
31 MF_INFO(Journal::Component::Portal, Journal::Context::Networking,
32 "Portal::Network initialized");
33 return true;
34}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)

References MF_ERROR, MF_INFO, MF_WARN, MayaFlux::Journal::Networking, and MayaFlux::Journal::Portal.

Referenced by MayaFlux::Core::NetworkSubsystem::initialize().

+ Here is the caller graph for this function: