SpiecsEngine
 
Loading...
Searching...
No Matches

◆ ~TcpServer()

Spices::Net::TcpServer::~TcpServer ( )
virtual

Destructor Function.

Definition at line 33 of file TcpServer.cpp.

34 {
36
37 for (auto& item : m_Connections)
38 {
39 const TcpConnectionPtr connection = item.second;
40 item.second.reset();
41
42 EventLoopThreadWrapper::GetInst()->RunInLoop([=]() { connection->ConnectDestroyed(); });
43 }
44 }
#define SPICES_PROFILE_ZONE
static EventLoop *& GetInst(InetAddress *address=nullptr)
Get EventLoop Instance. @reutrn Returns EventLoop Instance.
void RunInLoop(Functor cb)
Push functor to pending functors.
Definition EventLoop.cpp:79
ConnectionMap m_Connections
All TcpConnections.
Definition TcpServer.h:175
std::shared_ptr< TcpConnection > TcpConnectionPtr
Definition Callbacks.h:18