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

More optimal behavior for rtosc_message (possible API break) #56

Closed
nick87720z opened this issue Jun 20, 2021 · 1 comment
Closed

More optimal behavior for rtosc_message (possible API break) #56

nick87720z opened this issue Jun 20, 2021 · 1 comment

Comments

@nick87720z
Copy link

Proposed difference is in return value for rtosc_message in case of failure.
For now if buffer is too small, it just returns zero length.
Buffer could be reallocated for bigger size, but that needs new call with NULL buffer pointer just to know required size. However, this size could be returned on actual attempt to fill buffer. No even need to null buffer automatically - if buffer is about to be reallocated, than already received data could be preserved during realloc, and remaining data could be received in addition to already received data (well, if OSC allowes).

Of if this is implemented: mattconte/tlsf#21
then reallocation could be done without actual data movement - for case if osc doesn't support partial message pass in a way, described above.

@fundamental
Copy link
Owner

The core of rtosc by design does not perform allocations. I understand the motivation for the feature request, but I do not plan on making this modification.

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

No branches or pull requests

2 participants