Changeset 4950 in ntrip
- Timestamp:
- Feb 23, 2013, 5:13:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/thrift/test2/server.cpp
r4949 r4950 29 29 class t_connection { 30 30 public: 31 shared_ptr<myService> _service; 32 shared_ptr<TProcessor> _processor; 33 shared_ptr<TProtocol> _protocolInp; 34 shared_ptr<TProtocol> _protocolOut; 35 shared_ptr<TTransport> _transport; 31 shared_ptr<myService> _service; 32 shared_ptr<myServiceClient> _client; 33 shared_ptr<TProcessor> _processor; 34 shared_ptr<TProtocol> _protocolInp; 35 shared_ptr<TProtocol> _protocolOut; 36 shared_ptr<TTransport> _transport; 36 37 }; 37 38 … … 42 43 myProcessorFactory() {}; 43 44 shared_ptr<TProcessor> getProcessor(const TConnectionInfo& info) { 44 shared_ptr<myService> service(new myService()); 45 shared_ptr<TProcessor> processor(new myServiceProcessor(service)); 45 shared_ptr<myServiceClient> client(new myServiceClient(info.output)); 46 shared_ptr<myService> service(new myService()); 47 shared_ptr<TProcessor> processor(new myServiceProcessor(service)); 46 48 cout << "connection " << endl; 47 49 48 50 CONNECTION.reset(new t_connection); 49 51 CONNECTION->_service = service; 52 CONNECTION->_client = client; 50 53 CONNECTION->_processor = processor; 51 54 CONNECTION->_protocolInp = info.input; … … 90 93 string answ; 91 94 cout << "CONNECTION " << endl; 92 CONNECTION->_ service->answer(answ, "How are you?");95 CONNECTION->_client->answer(answ, "How are you?"); 93 96 } 94 97 sleep(1);
Note:
See TracChangeset
for help on using the changeset viewer.