MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FindSession

Method FindSession

adapter/micro_thread/mt_net.cpp:1334–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1332}
1333
1334CNetHandler* CSockLink::FindSession(uint64_t sid)
1335{
1336 CNetHandler key;
1337 CDestLinks* dstlink = (CDestLinks*)_parents;
1338 if (NULL == dstlink)
1339 {
1340 MTLOG_ERROR("session dest link invalid, maybe error");
1341 return NULL;
1342 }
1343 struct sockaddr_in addr;
1344 key.SetDestAddress(this->GetDestAddr(&addr));
1345 key.SetConnType(dstlink->GetConnType());
1346 key.SetProtoType(dstlink->GetProtoType());
1347 key.SetSessionId(sid);
1348
1349 return CNetMgr::Instance()->FindNetItem(&key);
1350}
1351
1352int CSockLink::InputNotify()
1353{

Callers 3

DispathTcpMethod · 0.95
DispathUdpMethod · 0.95
InputNotifyMethod · 0.45

Calls 8

GetDestAddrMethod · 0.95
FindNetItemMethod · 0.80
SetDestAddressMethod · 0.45
SetConnTypeMethod · 0.45
GetConnTypeMethod · 0.45
SetProtoTypeMethod · 0.45
GetProtoTypeMethod · 0.45
SetSessionIdMethod · 0.45

Tested by

no test coverage detected