keijiro / OscJack

Lightweight C# implementation of OSC server/client
The Unlicense
475 stars 66 forks source link

Character limit for strings? #33

Closed marvpaul closed 2 years ago

marvpaul commented 2 years ago

I tried to sent a bigger string which was only partially received. Is there a byte limit for a string I sent?

keijiro commented 2 years ago

There seems to be 4KB limit.

https://github.com/keijiro/OscJack/blob/main/Packages/jp.keijiro.osc-jack/Runtime/Base/OscServer.cs#L125 https://github.com/keijiro/OscJack/blob/main/Packages/jp.keijiro.osc-jack/Runtime/Base/Internal/OscPacketEncoder.cs#L47

You can extend it by modifying these lines.

I have no idea why I put 4096 on these lines... I should make them configurable.

marvpaul commented 2 years ago

Thanks a lot for this! Perhaps you can help me with another question as well: i want to synchronize the server and the Client so that they „have the exact same time“. I thought about sending a timestamp inside of an OSC message but then there is a delay between sending the message and receiving it on the other node (network latency). Any chance to get to know how long it took for the message to be transferred over the network?

Mit freundlichen Grüßen Marvin.

On 15. Feb 2022, at 12:46, Keijiro Takahashi @.***> wrote:

 There seems to be 4KB limit.

https://github.com/keijiro/OscJack/blob/main/Packages/jp.keijiro.osc-jack/Runtime/Base/OscServer.cs#L125 https://github.com/keijiro/OscJack/blob/main/Packages/jp.keijiro.osc-jack/Runtime/Base/Internal/OscPacketEncoder.cs#L47

You can extend it by modifying these lines.

I have no idea why I put 4096 on these lines... I should make them configurable.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

keijiro commented 2 years ago

I'm not a networking expert. I'd recommend asking a specialist of network programming.

keijiro commented 2 years ago

I'm closing this issue as resolved now. Please reopen it for further problem on the original post.