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

◆ shutdown()

void MayaFlux::Core::TCPBackend::shutdown ( )
overridevirtual

Release all resources, close all endpoints.

After this call initialize() must be called again to reuse the backend.

Implements MayaFlux::Core::INetworkBackend.

Definition at line 90 of file TCPBackend.cpp.

91{
92 stop();
93
94 {
95 std::unique_lock lock(m_connections_mutex);
96 m_connections.clear();
97 }
98
99 {
100 std::unique_lock lock(m_listeners_mutex);
101 m_listeners.clear();
102 }
103
104 m_initialized.store(false);
105
107 "TCP backend shutdown");
108}
#define MF_INFO(comp, ctx,...)
std::unordered_map< uint64_t, std::unique_ptr< ConnectionState > > m_connections
std::shared_mutex m_listeners_mutex
std::unordered_map< uint64_t, std::unique_ptr< ListenerState > > m_listeners
std::shared_mutex m_connections_mutex
void stop() override
Stop receive threads without releasing resources.
std::atomic< bool > m_initialized
@ Shutdown
Engine/subsystem shutdown and cleanup.
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, m_connections, m_connections_mutex, m_initialized, m_listeners, m_listeners_mutex, MF_INFO, MayaFlux::Journal::Shutdown, and stop().

Referenced by ~TCPBackend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: