Main Page
Namespaces
Classes
Files
File List
File Members
src
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
}
callback
void callback(const vector< uint8_t > &msg)
Definition:
test_recv.cpp:27
std
udp_bc_broker::UdpRecver
Definition:
recv.h:44
recv.h
main
int main()
Definition:
test_recv.cpp:35
udp_bc_broker::UdpRecver::receive
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