SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnConnection()

void Spices::Net::HttpServer::OnConnection ( const TcpConnectionPtr & connection)
private

Definition at line 39 of file HttpServer.cpp.

40 {
42
43 if (connection->Connected())
44 {
45 SPICES_CORE_INFO("New Http Connection")
46
47 m_ConnectionList.push_back(connection);
48
49 Node node = --m_ConnectionList.end();
50 m_NameNodeMap[connection->GetName()] = node;
51 }
52 else
53 {
54 SPICES_CORE_INFO("Http Connection Closed")
55
56 assert(m_NameNodeMap.count(connection->GetName()));
57 const Node& node = m_NameNodeMap[connection->GetName()];
58 m_NameNodeMap.erase(connection->GetName());
59 m_ConnectionList.erase(node);
60 }
61 }
#define SPICES_PROFILE_ZONE
WeakConnectionList::iterator Node
Definition HttpServer.h:26
WeakConnectionList m_ConnectionList
Definition HttpServer.h:78
constexpr int count
Calculate count that meets requirement.
Definition TypeList.h:289