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

Method Request

library/cpp/par/par_network.cpp:275–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 }
274
275 TAutoPtr<TNetworkResponse> Request(const TNetworkAddress& address, const TString& url, TVector<char>* data) override {
276 CHROMIUM_TRACE_FUNCTION();
277 TIntrusivePtr<TSyncRequestsInfo> reqInfo = new TSyncRequestsInfo;
278 TGUID reqId;
279 CreateGuid(&reqId);
280 DirectRequestsInfo.EmplaceValue(reqId, reqInfo);
281 RequestsInfo.EmplaceValue(reqId, address);
282 PAR_DEBUG_LOG << "From " << GetHostAndPort() << " sending request " << GetGuidAsString(reqId) << " url: " << url << " data len: " << (data ? data->size() : 0) << Endl;
283 InternalSendQuery(address, reqId, url + "@" + ToString(ListenPort), data);
284 reqInfo->Event.WaitI();
285 Y_ABORT_UNLESS(DirectRequestsInfo.EraseValueIfPresent(reqId));
286 return std::move(reqInfo->Response);
287 }
288
289 private:
290 void InternalSendQuery(const TNetworkAddress& address, const TGUID& requestId, const TString& url, TVector<char>* data) {

Callers 4

InternalSendQueryMethod · 0.45
RequestMethod · 0.45
LocalExecMethod · 0.45

Calls 9

CreateGuidFunction · 0.85
GetHostAndPortFunction · 0.85
GetGuidAsStringFunction · 0.85
EmplaceValueMethod · 0.80
EraseValueIfPresentMethod · 0.80
ToStringFunction · 0.50
moveFunction · 0.50
sizeMethod · 0.45
WaitIMethod · 0.45

Tested by

no test coverage detected