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

Method Schedule

library/cpp/neh/netliba.cpp:256–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 }
255
256 inline THandleRef Schedule(const TMessage& msg, IOnRecv* cb, TServiceStatRef& ss) {
257 TParsedLocation loc(msg.Addr);
258 TUdpAddress addr;
259
260 const TResolvedHost* resHost = CachedResolve(TResolveInfo(loc.Host, loc.GetPort()));
261 GetUdpAddress(&addr, FindIP(&resHost->Addr));
262
263 TClientThread& clnt = *Clnt_[resHost->Id % Clnt_.size()];
264 TIntrusivePtr<INetLibaRequester> rr = clnt.R_;
265 TRequestRef req(new TRequest(rr, resHost->Id, msg, cb, !ss ? nullptr : new TStatCollector(ss)));
266
267 clnt.EH_->OnSend(req);
268 rr->SendRequest(addr, ToString(loc.Service), msg.Data, req->Guid());
269
270 return THandleRef(req.Get());
271 }
272
273 private:
274 TVector<TAutoPtr<TClientThread>> Clnt_;

Callers 1

ScheduleRequestMethod · 0.45

Calls 9

CachedResolveFunction · 0.85
TResolveInfoClass · 0.85
GetUdpAddressFunction · 0.50
ToStringFunction · 0.50
GetPortMethod · 0.45
sizeMethod · 0.45
OnSendMethod · 0.45
SendRequestMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected