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

Method GetConnection

adapter/micro_thread/mt_connection.cpp:718–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716}
717
718IMtConnection* ConnectionMgr::GetConnection(CONN_OBJ_TYPE type, struct sockaddr_in* dst)
719{
720 switch (type)
721 {
722 case OBJ_SHORT_CONN:
723 return _udp_short_queue.AllocPtr();
724 break;
725
726 case OBJ_TCP_KEEP:
727 return _tcp_keep_mgr.GetTcpKeepConn(dst);
728 break;
729
730 case OBJ_UDP_SESSION:
731 return _udp_session_queue.AllocPtr();
732 break;
733
734 default:
735 return NULL;
736 break;
737 }
738
739}
740
741void ConnectionMgr::FreeConnection(IMtConnection* conn, bool force_free)
742{

Callers 2

InitConnEnvMethod · 0.80
mt_tcp_get_keep_connFunction · 0.80

Calls 2

AllocPtrMethod · 0.80
GetTcpKeepConnMethod · 0.80

Tested by

no test coverage detected