#include #include #include #include #include #include "Pos.h" #include "sha1.h" #include using namespace std; using namespace apache::thrift; using namespace apache::thrift::protocol; using namespace apache::thrift::transport; using namespace pos; using namespace boost; int main(int argc, char** argv) { if (argc != 2) { cout << "Usage: dump \n"; exit(1); } shared_ptr socket(new TSocket(argv[1], 9090)); shared_ptr transport(new TFramedTransport(socket)); shared_ptr protocol(new TBinaryProtocol(transport)); PosClient client(protocol); try { transport->open(); } catch(TException & e) { std::cerr << e.what() << "\n"; exit(1); } vector data; client.toString(data); for (uint32_t i = 0; i < data.size(); i++) { cout << data[i] << "\n"; } return 0; }