Moving from govendor to dep.
Vendor folder has been deleted. Use dep to regenerate vendor folder.
This commit is contained in:
parent
9631aa3aab
commit
03278a882b
2181 changed files with 400398 additions and 346 deletions
40
vendor/git.apache.org/thrift.git/contrib/zeromq/test-receiver.cpp
generated
vendored
Normal file
40
vendor/git.apache.org/thrift.git/contrib/zeromq/test-receiver.cpp
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include "zmq.hpp"
|
||||
#include "TZmqServer.h"
|
||||
#include "Storage.h"
|
||||
|
||||
using boost::shared_ptr;
|
||||
using apache::thrift::TProcessor;
|
||||
using apache::thrift::server::TZmqServer;
|
||||
using apache::thrift::server::TZmqMultiServer;
|
||||
|
||||
class StorageHandler : virtual public StorageIf {
|
||||
public:
|
||||
StorageHandler()
|
||||
: value_(0)
|
||||
{}
|
||||
|
||||
void incr(const int32_t amount) {
|
||||
value_ += amount;
|
||||
printf("value_: %i\n", value_) ;
|
||||
}
|
||||
|
||||
int32_t get() {
|
||||
return value_;
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t value_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
shared_ptr<StorageHandler> handler(new StorageHandler());
|
||||
shared_ptr<TProcessor> processor(new StorageProcessor(handler));
|
||||
|
||||
zmq::context_t ctx(1);
|
||||
TZmqServer oneway_server(processor, ctx, "epgm://eth0;239.192.1.1:5555", ZMQ_SUB);
|
||||
oneway_server.serve();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue