256dpi/OSCKit — pull request #3 by codeflows (2014-12-28 23:58:05+00:00)
Title: Osc bundle support

Hi again, and happy holidays!

Today I noticed that some OSC replies weren't getting through to my OSCServerDelegate implementation. On a closer look, I noticed that these messages were bundled and bundles were being silently ignored. (FWIW, I'm interfacing against Ableton Live's LiveOSC which bundles messages in some cases.)

I took a stab at implementing the bundle support for incoming messages. The code is adapted from `OscPacketListener.h`.

I renamed `OSCProtocol.unpackMessage` to `OSCProtocol.unpackMessages`, as one arriving packet might contain many messages. Also, I made the method callback-based which seemed straightforward to implement (vs constructing & returning an intermediate message array array from `unpackMessages`.)

One big shortcoming for now is the lack of tests for unpacking bundled messages. I did fix the compilation errors I caused in the tests but couldn't actually run the tests in XCode for some reason.

What do you think?