MCPcopy Create free account
hub / github.com/apache/thrift / processContext

Method processContext

contrib/fb303/TClientInfo.cpp:119–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void TClientInfoServerHandler::processContext(void* connectionContext,
120 shared_ptr<TTransport> transport) {
121 Connect* call = static_cast<Connect*>(connectionContext);
122 if (call->callInfo_ == nullptr) {
123 if (typeid(*(transport.get())) == typeid(TSocket)) {
124 TSocket* tsocket = static_cast<TSocket*>(transport.get());
125 int fd = tsocket->getSocketFD();
126 if (fd < 0) {
127 return;
128 }
129 call->callInfo_ = call->clientInfo_->getConnection(fd, true);
130 assert(call->callInfo_ != nullptr);
131 socklen_t len;
132 call->callInfo_->recordAddr(tsocket->getCachedAddress(&len));
133 }
134 }
135}
136
137void TClientInfoServerHandler::getStatsStrings(vector<string>& result) {
138 result.clear();

Callers

nothing calls this directly

Calls 5

getConnectionMethod · 0.80
recordAddrMethod · 0.80
getCachedAddressMethod · 0.80
getMethod · 0.45
getSocketFDMethod · 0.45

Tested by

no test coverage detected