test_recv.cpp
Go to the documentation of this file.
1 
23 #include "udp_bc_broker/recv.h"
24 
25 using namespace std;
26 
27 void callback(const vector<uint8_t>& msg)
28 {
29  for(int i = 0; i < msg.size(); i++) {
30  std::cout<<(char)msg[i];
31  }
32  std::cout<<std::endl;
33 }
34 
35 int main()
36 {
37  udp_bc_broker::UdpRecver recver(12321);
38  recver.receive(callback);
39 
40  while(true) {
41  sleep (1);
42  }
43 }
void callback(const vector< uint8_t > &msg)
Definition: test_recv.cpp:27
int main()
Definition: test_recv.cpp:35
void receive(boost::function< void(const vector< uint8_t > &)> callBack)
Definition: recv.cpp:95


udp_bc_broker
Author(s):
autogenerated on Mon Jun 10 2019 14:02:40