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

Class TNetworkEvent

library/cpp/par/par_remote.h:21–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace NPar {
20 class TRemoteQueryProcessor;
21 struct TNetworkEvent {
22 enum class EType {
23 IncomingQuery,
24 IcomingQueryCancel,
25 ReplyReceived
26 };
27 EType EventType;
28 TGUID ReqId;
29 TAtomicSharedPtr<TNetworkRequest> Request;
30 TAtomicSharedPtr<TNetworkResponse> Response;
31 TNetworkEvent() = default;
32 explicit TNetworkEvent(TNetworkRequest* request)
33 : EventType(EType::IncomingQuery)
34 , ReqId(request->ReqId)
35 , Request(request)
36 {
37 }
38 explicit TNetworkEvent(TNetworkResponse* response)
39 : EventType(EType::ReplyReceived)
40 , ReqId(response->ReqId)
41 , Response(response)
42 {
43 }
44 explicit TNetworkEvent(const TGUID& reqId)
45 : EventType(EType::IcomingQueryCancel)
46 , ReqId(reqId)
47 {
48 }
49 };
50
51 struct ICmdProcessor : virtual public TThrRefBase {
52 virtual void NewRequest(TRemoteQueryProcessor* p, TNetworkRequest* req) = 0;

Callers 3

ReplyCallbackImplMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected