thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yh zhang <>
Subject About TThreadPoolServer
Date Fri, 07 May 2010 00:06:40 GMT
The situation is like this:
       We have several clients, let's say client1 and cient2, and each
client will start a callback server to receive message from server, and of
course, different callback servers should have different port number.
       Inside server, we use TThreadPoolServer and we have a class(let's say
CClient) to inherit handler class (let's say CalculatorHandler() in
tutorial), in this way, we can create an instance of CClient and use it as a
parameter to initial TThreadPoolServer  server. But the problem is that if
we have several clients, we want to create our class instance for every
server thread (Now it can only be created when initial TThreadedServer). Is
there way to create new class instance (CClient) when server accepts a new
client? (means that we want to create new class instance when each server
thread is created)
       Thanks very much.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message