I'm having trouble reliably sending UDP messages to multiple IP's from OF. The messages are byte arrays used as a color state by a matrix of LEDS (controlled by a teensy board) Here's my code:
in the header:
ofxUDPManager udpConnection;
ofxUDPManager udpConnection2;
in setup():
udpConnection.Create();
udpConnection.Connect("192.168.2.1", 11999);
udpConnection.SetNonBlocking(true);
udpConnection2.Create();
udpConnection2.Connect("192.168.2.5", 9999);
udpConnection2.SetNonBlocking(true);
in draw():
udpConnection.Send(msg, msgSize);
ofSleepMillis(8);
udpConnection2.Send(msg2, msgSize);
ofSleepMillis(8);
msg is an array of 973 bytes. If I only send to one of the IP's, it runs fine. If I send to both, it in-determinately switches between sending to one and sending to another. I almost feel like it's trying to push both messages through the same port on oF's side. Does anyone have any idea why this would be happening?