26 OscReceiver(
int port, std::function<
void(oscpkt::Message* msg,
const char* addr,
void* arg)> on_receive,
void* callbackArg =
nullptr);
39 void setup(
int port, std::function<
void(oscpkt::Message* msg,
const char* addr,
void* arg)> on_receive,
void* callbackArg =
nullptr);
42 bool lShouldStop =
false;
44 volatile bool waitingForMessage =
false;
45 int waitForMessage(
int timeout_ms);
47 std::unique_ptr<UdpServer> socket;
48 std::unique_ptr<std::thread> receive_task;
50 void receive_task_func();
52 std::unique_ptr<oscpkt::PacketReader> pr;
53 std::vector<char> inBuffer;
55 std::function<void(oscpkt::Message* msg, const char* addr, void* arg)> on_receive;
56 void* onReceiveArg =
nullptr;
Definition: UdpServer.h:22
OscReceiver provides functions for receiving OSC messages in Bela.
Definition: OscReceiver.h:23
void setup(int port, std::function< void(oscpkt::Message *msg, const char *addr, void *arg)> on_receive, void *callbackArg=nullptr)
Initiliases OscReceiver.
Definition: OscReceiver.cpp:37