]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/contrib/zeromq/test-client.cpp
3 #include <thrift/protocol/TBinaryProtocol.h>
6 #include "TZmqClient.h"
9 using apache::thrift::std::shared_ptr
;
10 using apache::thrift::transport::TZmqClient
;
11 using apache::thrift::protocol::TBinaryProtocol
;
13 int main(int argc
, char** argv
) {
14 const char* endpoint
= "tcp://127.0.0.1:9090";
15 int socktype
= ZMQ_REQ
;
21 endpoint
= "tcp://127.0.0.1:9091";
25 zmq::context_t
ctx(1);
26 shared_ptr
<TZmqClient
> transport(new TZmqClient(ctx
, endpoint
, socktype
));
27 shared_ptr
<TBinaryProtocol
> protocol(new TBinaryProtocol(transport
));
28 StorageClient
client(protocol
);
35 int value
= client
.get();
36 std::cout
<< value
<< std::endl
;