ofxUDPManager: Sending messages to multiple IPs

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?

if you are trying to send too much info udp just fails silently. to check if that’s the problem you can try throttling the message sending by sending to 1 ip only each frame or making the fps of the app half of what you have right now. you can try making the fps really low, even 1 or 2 fps to see if that makes the msg arrive to both ips and then increase it to see at which speed it begins to loose packages

It has been awhile since I did this, but here is the setup I used.

    udpConnection.Create();
    udpConnection.SetEnableBroadcast(true);
    udpConnection.SetReuseAddress(true);

    //224.0.0.1	All Systems on this Subnet
   //http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml
    udpConnection.ConnectMcast("224.0.0.1",11999);
    udpConnection.SetNonBlocking(true);

    //RX UDP
    udpConnectionRx.Create();
    udpConnection.SetReuseAddress(true);
	udpConnectionRx.BindMcast("224.0.0.1",11998); //incomming data on my port # ...
	udpConnectionRx.Bind(11998); //incomming data on my port # ...
	udpConnectionRx.SetNonBlocking(true);

As I said, it’s been awhile, but I was able to send to multiple systems simultaneously with this code. the data I was sending was Address:rgba data for ~1000 LED’s.

Good luck.