Changeset 4950 in ntrip


Ignore:
Timestamp:
Feb 23, 2013, 5:13:15 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/thrift/test2/server.cpp

    r4949 r4950  
    2929class t_connection {
    3030 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;
    3637};
    3738
     
    4243  myProcessorFactory() {};
    4344  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));
    4648    cout << "connection " << endl;
    4749
    4850    CONNECTION.reset(new t_connection);   
    4951    CONNECTION->_service     = service;
     52    CONNECTION->_client      = client;
    5053    CONNECTION->_processor   = processor;
    5154    CONNECTION->_protocolInp = info.input;
     
    9093      string answ;
    9194      cout << "CONNECTION " << endl;
    92       CONNECTION->_service->answer(answ, "How are you?");
     95      CONNECTION->_client->answer(answ, "How are you?");
    9396    }
    9497    sleep(1);
Note: See TracChangeset for help on using the changeset viewer.