OSCCore
OSCCore copied to clipboard
Utilize NIO ByteBuffer in serialization
NIO provides a useful type for serializing stuff into byte stream, ByteBuffer.
Actual implementation simply concatenates output into [UInt8]. ByteBuffer covers this function way better.
Affected types
OSCConvertibleprotocol that defines serialization, particularlyvar oscValue: [Byte]? { get }- provides serialized value as bytes arrayinit?(data: [Byte])andinit?(data: ArraySlice<Byte>)constructors. They make up types from bytes stream
- conversion module is where serialization stuff takes place
extract.swiftthe entry point of decoding OSC packets.- Constructors of
OSCMessageandOSCBundlewhere all the decoding happens.
Tests/OSCCoreTests/ValueConversionTeststest suite.
This ticket also affects #16
Also consider testing serialization via NIO's preferred testing tool ByteToMessageDecoderVerifier