extOSC icon indicating copy to clipboard operation
extOSC copied to clipboard

Big strings of text arent passed between android devices.

Open TheBricktop opened this issue 2 years ago • 4 comments

Hello, im sending big json (not massive but 8k chars) from one device to other using extosc. While the exchange is between win10 device and android there is no problem. But when the exchange is between two androids the packet is not arriving to the other one. While shorter strings are arriving without any problems, is there a limit of what can be shared through the extosc on android ? Ive increased packet size to 65507 but still the issue persist, and only on android.

Edit: it is weird but any string longer than 1024 chars are not getting send from android to any other client.

TheBricktop avatar Jan 28 '22 23:01 TheBricktop

Hey! In general, since OSC uses UDP, sending messages larger than 1500 bytes (https://en.wikipedia.org/wiki/Maximum_transmission_unit) in one send is a bad decision. Since larger packets will break into smaller packets, then they will be lost more often, so messages may not reach.

Accordingly, it is better to send such a large json in pieces.

But so far I have no idea - is this a limitation in Android, or just packets are lost due to the fact that they are larger than the MTU size.

Iam1337 avatar Jan 31 '22 16:01 Iam1337

Well i've made a byte splitter / assembler so i think its a good thing that ive run into this limitation.

TheBricktop avatar Feb 02 '22 19:02 TheBricktop

Yep, that's the correct implementation.

Iam1337 avatar Feb 03 '22 11:02 Iam1337

I might share a code later never know when one might need it. Also uses unitask async for packet assembly.

TheBricktop avatar Feb 03 '22 21:02 TheBricktop