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

Method GetSessionCallback

adapter/micro_thread/mt_net.cpp:1145–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143}
1144
1145CHECK_SESSION_CALLBACK CSockLink::GetSessionCallback()
1146{
1147 CHECK_SESSION_CALLBACK check_session = NULL;
1148
1149 CNetHandler* item = TAILQ_FIRST(&_wait_recv);
1150 if (NULL == item)
1151 {
1152 MTLOG_DEBUG("recv data with no wait item, err");
1153 goto EXIT_LABEL;
1154 }
1155
1156 check_session = item->GetSessionCallback();
1157 if (NULL == check_session)
1158 {
1159 MTLOG_ERROR("recv data with no session callback, err");
1160 goto EXIT_LABEL;
1161 }
1162
1163EXIT_LABEL:
1164
1165 CDestLinks* dstlink = (CDestLinks*)_parents;
1166 if (NULL == dstlink)
1167 {
1168 return check_session;
1169 }
1170
1171 if (check_session != NULL)
1172 {
1173 dstlink->SetDefaultCallback(check_session);
1174 }
1175 else
1176 {
1177 check_session = dstlink->GetDefaultCallback();
1178 }
1179
1180 return check_session;
1181}
1182
1183int32_t CSockLink::DispathTcp()
1184{

Callers 2

DispathTcpMethod · 0.95
DispathUdpMethod · 0.45

Calls 2

SetDefaultCallbackMethod · 0.80
GetDefaultCallbackMethod · 0.80

Tested by

no test coverage detected