MCPcopy Create free account
hub / github.com/catboost/catboost / LoadResponseData

Function LoadResponseData

library/cpp/netliba/v6/udp_http.cpp:1139–1163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137 }
1138
1139 static void LoadResponseData(TUdpHttpResponse* res) {
1140 if (!res || res->DataHolder.Get() == nullptr)
1141 return;
1142 {
1143 TBlockChainIterator reqData(res->DataHolder->Data->GetChain());
1144 char pktType;
1145 reqData.Read(&pktType, 1);
1146 TGUID guid;
1147 reqData.Read(&guid, sizeof(guid));
1148 Y_ASSERT(res->ReqId == guid);
1149 if (pktType == PKT_RESPONSE) {
1150 ReadYArr(&reqData, &res->Data);
1151 } else if (pktType == PKT_LOCAL_RESPONSE) {
1152 ReadShm(res->DataHolder->Data->GetSharedData(), &res->Data);
1153 } else
1154 Y_ASSERT(0);
1155 if (reqData.HasFailed()) {
1156 Y_ASSERT(0 && "wrong format, memory corruption suspected");
1157 res->Ok = TUdpHttpResponse::FAILED;
1158 res->Data.clear();
1159 res->Error = "wrong response format";
1160 }
1161 }
1162 res->DataHolder.Reset(nullptr);
1163 }
1164
1165 //////////////////////////////////////////////////////////////////////////
1166 // IRequestOps::TWaitResponse

Callers 1

GetResponseMethod · 0.70

Calls 8

ReadYArrFunction · 0.70
ReadShmFunction · 0.70
GetMethod · 0.45
ReadMethod · 0.45
GetSharedDataMethod · 0.45
HasFailedMethod · 0.45
clearMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected