void OscSender::sendBundle(OscBundle& bundle){ static const int OUTPUT_BUFFER_SIZE = 32768; char buffer[OUTPUT_BUFFER_SIZE]; ::osc::OutboundPacketStream p(buffer, OUTPUT_BUFFER_SIZE); appendBundle(bundle, p); socket->Send(p.Data(), p.Size()); }
void ofxOscSender::sendBundle( ofxOscBundle& bundle ) { static const int OUTPUT_BUFFER_SIZE = 32768;//32768; char buffer[OUTPUT_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OUTPUT_BUFFER_SIZE ); // serialise the bundle appendBundle( bundle, p ); socket->Send( p.Data(), p.Size() ); }
void OscSender::appendBundle(OscBundle& bundle, ::osc::OutboundPacketStream& p){ p << ::osc::BeginBundleImmediate; for (int i = 0; i < bundle.getBundleCount(); i++){ appendBundle(bundle.getBundleAt(i), p); } for (int i = 0; i < bundle.getMessageCount(); i++){ appendMessage(bundle.getMessageAt(i), p); } p << ::osc::EndBundle; }
void ofxOscSender::sendBundle( ofxOscBundle& bundle ) { //setting this much larger as it gets trimmed down to the size its using before being sent. //TODO: much better if we could make this dynamic? Maybe have ofxOscBundle return its size? static const int OUTPUT_BUFFER_SIZE = 327680; char buffer[OUTPUT_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OUTPUT_BUFFER_SIZE ); // serialise the bundle appendBundle( bundle, p ); socket->Send( p.Data(), p.Size() ); }
void ofxOscSender::appendBundle( ofxOscBundle& bundle, osc::OutboundPacketStream& p ) { // recursively serialise the bundle p << osc::BeginBundleImmediate; for ( int i=0; i<bundle.getBundleCount(); i++ ) { appendBundle( bundle.getBundleAt( i ), p ); } for ( int i=0; i<bundle.getMessageCount(); i++ ) { appendMessage( bundle.getMessageAt( i ), p ); } p << osc::EndBundle; }