THRIFT-928. cpp: Thrift Server Client Stats
Add the ability for Thrift servers to monitor client connections. It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().
The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005139 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 685957a..d30475b 100644
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -289,7 +289,7 @@
class TestProcessorEventHandler : public TProcessorEventHandler {
- virtual void* getContext(const char* fn_name) {
+ virtual void* getContext(const char* fn_name, void* serverContext) {
return new std::string(fn_name);
}
virtual void freeContext(void* ctx, const char* fn_name) {