Changeset 4944 in ntrip for trunk/GnssCenter/thrift/test2/client.cpp
- Timestamp:
- Feb 23, 2013, 3:54:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/thrift/test2/client.cpp
r4942 r4944 13 13 using namespace apache::thrift::transport; 14 14 15 class myService Handler: virtual public myServiceIf {15 class myService : virtual public myServiceIf { 16 16 public: 17 myService Handler() {}17 myService() {} 18 18 void answer(std::string& answ, const std::string& question) { 19 19 cout << "Server asks: " << question << endl; … … 25 25 int main(int argc, char** argv) { 26 26 int port = 9090; 27 shared_ptr<TSocket> 28 shared_ptr<TTransport> 29 shared_ptr<TProtocol> 27 shared_ptr<TSocket> socket(new TSocket("localhost", port)); 28 shared_ptr<TTransport> transport(new TBufferedTransport(socket)); 29 shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport)); 30 30 31 shared_ptr<myService Handler> handler(new myServiceHandler());32 shared_ptr<TProcessor> processor(new myServiceProcessor(handler));31 shared_ptr<myService> service(new myService()); 32 shared_ptr<TProcessor> processor(new myServiceProcessor(service)); 33 33 34 34 try {
Note:
See TracChangeset
for help on using the changeset viewer.