Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize NIO ByteBuffer in serialization #19

Open
segabor opened this issue Jan 14, 2019 · 1 comment
Open

Utilize NIO ByteBuffer in serialization #19

segabor opened this issue Jan 14, 2019 · 1 comment

Comments

@segabor
Copy link
Owner

segabor commented Jan 14, 2019

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

  • OSCConvertible protocol that defines serialization, particularly
    • var oscValue: [Byte]? { get } - provides serialized value as bytes array
    • init?(data: [Byte]) and init?(data: ArraySlice<Byte>) constructors. They make up types from bytes stream
  • conversion module is where serialization stuff takes place
    • extract.swift the entry point of decoding OSC packets.
    • Constructors of OSCMessage and OSCBundle where all the decoding happens.
  • Tests/OSCCoreTests/ValueConversionTests test suite.

This ticket also affects #16

@segabor segabor changed the title Use ByteBuffer for OSC serialization Utilize NIO ByteBuffer in serialization Jan 25, 2019
@segabor
Copy link
Owner Author

segabor commented Nov 1, 2019

Also consider testing serialization via NIO's preferred testing tool ByteToMessageDecoderVerifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant