Add 3rd-party network layer sample project
Closed this issue · 3 comments
Add a sample project that demonstrates integrating with a 3rd-party network library to send and receive OSC.
Ideal candidates:
- Apple's Network.framework
- WWDC video shows in-depth example code and usage
- Swift-NIO
This would be really valuable. Just reading the readme for Swift-NIO makes my head spin. It’s preventing me from even trying your library (which looks great!)
Agreed - I did spent a little time with Swift-NIO in effort to get a sample project put together for OSCKit, but NIO is pretty complex and I didn't successfully get it working in the time I spent.
I may do a Network.framework demo because I've been using that in a number of my own apps and it's easier for the less tech-savvy.
I added an example project using Network.framework in the /Examples
folder.
On launch, it creates:
- a server that listens for OSC messages on port 8000 and prints incoming messages to the console
- a client that can send OSC messages to a hard-coded IP address and port (you can change this in ViewController.swift)
- a window containing a button to send a test OSC message using the OSC client (message is hard-coded and editable in ViewController.swift)
I didn't bump the release yet on the repo so just download the /Examples
folder using the ZIP file download.
I might add a bit of documentation in the README and bump the release in a bit.