sabhishepalc opened a new issue #752: Can you help me with an implementation 
for thrift 0.11.0? TNonBlockingServer
URL: https://github.com/apache/incubator-brpc/issues/752
 
 
   As I am trying to put across the following code and it's failing:
   
   //TNonBlockingServer.h desired method constructor
   
   TNonblockingServer(const stdcxx::shared_ptr& processor,
   const stdcxx::shared_ptr& inputTransportFactory,
   const stdcxx::shared_ptr& outputTransportFactory,
   const stdcxx::shared_ptr& inputProtocolFactory,
   const stdcxx::shared_ptr& outputProtocolFactory,
   const 
stdcxx::shared_ptrapache::thrift::transport::TNonblockingServerTransport& 
serverTransport,
   const stdcxx::shared_ptr& threadManager
   = stdcxx::shared_ptr())
   : TServer(processor), serverTransport_(serverTransport) {
   init();
   
   setInputTransportFactory(inputTransportFactory);
   setOutputTransportFactory(outputTransportFactory);
   setInputProtocolFactory(inputProtocolFactory);
   setOutputProtocolFactory(outputProtocolFactory);
   setThreadManager(threadManager);
   //Sample code
   
   THRIFT_STDCXX::shared_ptrapache::thrift::concurrency::ThreadManager 
thread_mgr(
   apache::thrift::concurrency::ThreadManager::newSimpleThreadManager(4));
   
   THRIFT_STDCXX::shared_ptr<test_callHandler> handler(new test_callHandler());
   THRIFT_STDCXX::shared_ptrapache::thrift::concurrency::PosixThreadFactory 
thread_factory(
   new apache::thrift::concurrency::PosixThreadFactory(
   apache::thrift::concurrency::PosixThreadFactory::ROUND_ROBIN,
   apache::thrift::concurrency::PosixThreadFactory::NORMAL, 1, false));
   
   thread_mgr->threadFactory(thread_factory);
   
   thread_mgr->start();
   
   THRIFT_STDCXX::shared_ptrapache::thrift::server::TProcessor processor(
   new test_callProcessor(handler));
   THRIFT_STDCXX::shared_ptrapache::thrift::protocol::TProtocolFactory 
protocol_factory(
   new apache::thrift::protocol::TBinaryProtocolFactory());
   THRIFT_STDCXX::shared_ptrapache::thrift::transport::TTransportFactory 
transport_factory(
   new apache::thrift::transport::TBufferedTransportFactory());
   
   THRIFT_STDCXX::shared_ptrapache::thrift::transport::TNonblockingServerSocket 
server_transport =
   
THRIFT_STDCXX::make_sharedapache::thrift::transport::TNonblockingServerSocket(8888);
   
   apache::thrift::server::TNonblockingServer server(processor,
   transport_factory, transport_factory, protocol_factory,
   protocol_factory, server_transport);
   
   server.serve();
   
   //Facing undefined reference issue:
   
   undefined reference to 
`apache::thrift::server::TNonblockingServer::setThreadManager(boost::shared_ptrapache::thrift::concurrency::ThreadManager)'
   
   Can you please help?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to