| #include <thrift/protocol/TBinaryProtocol.h> |
| using apache::thrift::transport::TZmqClient; |
| using apache::thrift::protocol::TBinaryProtocol; |
| int main(int argc, char** argv) { |
| const char* endpoint = "tcp://127.0.0.1:9090"; |
| socktype = ZMQ_DOWNSTREAM; |
| endpoint = "tcp://127.0.0.1:9091"; |
| shared_ptr<TZmqClient> transport(new TZmqClient(ctx, endpoint, socktype)); |
| shared_ptr<TBinaryProtocol> protocol(new TBinaryProtocol(transport)); |
| StorageClient client(protocol); |
| int value = client.get(); |
| std::cout << value << std::endl; |