MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / AddConnection

Method AddConnection

WinArk/NetworkTable.cpp:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void CNetwrokTable::AddConnection(std::vector<std::shared_ptr<WinSys::Connection>>& vec, std::shared_ptr<WinSys::Connection> conn, bool reallyNew /* = true */) {
108 vec.push_back(conn);
109 auto pix = GetItemEx(conn.get());
110 ItemEx ix;
111 if (pix == nullptr)
112 pix = &ix;
113 if (pix->ProcessName.IsEmpty()) {
114 pix->ProcessName = m_pm.GetProcessNameById(conn->Pid).c_str();
115 m_ItemsEx.insert({ *conn,ix });
116 }
117}
118
119const CString CNetwrokTable::GetProcessName(WinSys::Connection* conn) const {
120 auto itemx = GetItemEx(conn);

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
IsEmptyMethod · 0.80
GetProcessNameByIdMethod · 0.80

Tested by

no test coverage detected