MCPcopy Create free account
hub / github.com/Tencent/phxqueue / Handle

Method Handle

phxqueue/comm/handler.h:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 virtual ~PBHandler() {}
48
49 virtual HandleResult Handle(const proto::ConsumerContext &cc, proto::QItem &item, std::string &uncompressed_buffer) {
50 T req;
51 if (!req.ParseFromString(uncompressed_buffer)) {
52 return HandleResult::RES_ERROR;
53 }
54 auto result = HandleRequest(item.meta().uin(), cc, *item.mutable_sys_cookies(), req);
55 if (IsBufferUpdated() && !req.SerializeToString(&uncompressed_buffer)) {
56 return HandleResult::RES_ERROR;
57 }
58 return result;
59 }
60
61 virtual HandleResult HandleRequest(uint64_t uin, const proto::ConsumerContext &cc, proto::Cookies &sys_cookies, T &req) = 0;
62};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected