Example #1
0
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());
}
Example #2
0
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() );
}
Example #3
0
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;
}
Example #4
0
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() );
}
Example #5
0
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;
}