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

Method AddResponse

library/cpp/neh/netliba.cpp:185–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 void AddResponse(TUdpHttpResponse* resp) override {
186 TUdpHttpResponsePtr ptr(resp);
187
188 UpdateInFly();
189 TInFly::iterator it = InFly_.find(resp->ReqId);
190
191 Y_ABORT_UNLESS(it != InFly_.end(), "incorrect incoming message");
192
193 TRequestRef& req = it->second;
194
195 if (req->SetNotified()) {
196 if (resp->Ok == TUdpHttpResponse::OK) {
197 req->NotifyResponse(TString(resp->Data.data(), resp->Data.size()));
198 } else {
199 if (resp->Ok == TUdpHttpResponse::CANCELED) {
200 req->NotifyError(new TError(resp->Error, TError::Cancelled));
201 } else {
202 req->NotifyError(new TError(resp->Error));
203 }
204 }
205 }
206
207 InFly_.erase(it);
208 }
209
210 void AddCancel(const TGUID& guid) override {
211 UpdateInFly();

Callers

nothing calls this directly

Calls 8

SetNotifiedMethod · 0.80
findMethod · 0.45
endMethod · 0.45
NotifyResponseMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
NotifyErrorMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected