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

Method FreeSockLink

adapter/micro_thread/mt_net.cpp:1509–1524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509void CDestLinks::FreeSockLink(CSockLink* sock)
1510{
1511 if ((sock == NULL) || (sock->GetParentsPtr() != (void*)this))
1512 {
1513 MTLOG_ERROR("invalid socklink %p, error", sock);
1514 return;
1515 }
1516
1517 TAILQ_REMOVE(&_sock_list, sock, _link_entry);
1518 if (this->_curr_link > 0) {
1519 this->_curr_link--;
1520 }
1521
1522 sock->Reset();
1523 CNetMgr::Instance()->FreeSockLink(sock);
1524}
1525
1526CSockLink* CDestLinks::GetSockLink()
1527{

Callers 1

DestroyMethod · 0.45

Calls 2

GetParentsPtrMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected