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

Add TCP Support #39

Open
orchetect opened this issue Sep 28, 2024 · 4 comments
Open

Add TCP Support #39

orchetect opened this issue Sep 28, 2024 · 4 comments
Labels
new feature New feature

Comments

@orchetect
Copy link
Owner

Feature request from a user: Add TCP support.

Even though TCP is not explicitly part of the OSC spec, it is entirely possible and would be a beneficial feature to add.

@orchetect orchetect added the new feature New feature label Sep 28, 2024
@rigor789
Copy link

I'm interested in TCP support. The docs mention the network layer is modular and could potentially be extended to work over TCP. Could you give some pointers where to look, and what might be involved in implementing it?

@orchetect
Copy link
Owner Author

orchetect commented Oct 16, 2024

Ideally it would mean one of two approaches:

  • add a mode parameter to the existing OSC classes that can determine their configuration as either UDP or TCP
  • introduce a new set of TCP sister classes to the existing UDP classes, and rename the UDP classes to disambiguate them

The networking logic would be fairly straightforward since we're using CocoaAsyncSocket.

@rigor789
Copy link

Thanks for the pointers!

I guess we could introduce a concept of a "backend" ie. OSCUdp, OSCTcp (OSCBle, custom etc.) but keep the current OSCServer/OSCClient's public API as is, and default to the OSCUdp backend internally?

Does that make sense to you?

Initially I might go for a simpler approach and test the waters with just replacing UDP with TCP.

@orchetect
Copy link
Owner Author

I like the notion of transport abstraction, but my initial thought is that there may be increasingly divergent identity and implementation requirements. For example, the concept of Client, Server, and Socket objects may not be as idiomatic for Bluetooth LE or any other arbitrary future transport added.

The classes themselves are lightweight enough that I am not worried about creating additional classes for a new transport paradigm - ultimately it may be cleaner and more approachable for new users. That said, I think implementing TCP first and getting it to operational state would come first, and refactors or abstractions would follow if appropriate.

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

No branches or pull requests

2 participants