segabor / OSCCore

A tiny OSC module implementation in Swift
MIT License
44 stars 5 forks source link

Write NIO Client #17

Closed segabor closed 5 years ago

segabor commented 6 years ago

Revisit examples and make them more NIO friendly. Currently they work but they are too ugly to read. Particularly, requesting synth frequency part in SuperColliderExample should be revisited and make it more readable like channel.getFrequency().then { print(freq) }

segabor commented 6 years ago

NIO does not provide itself pattern described above so the next step is to write a thin layer above NIO that supports it.

segabor commented 6 years ago

A similar concept https://github.com/apple/swift-nio-examples/blob/master/NIOSMTP/NIOSMTP/SendEmailHandler.swift

segabor commented 5 years ago

I much better approach is described in this pitch https://forums.swift.org/t/swiftnio-redis-client/19325

segabor commented 5 years ago

To make more sense to this ticket, let's make it specific to SuperColliderExample. Encapsulate NIO client communication into a single type making it more friendly to use.

segabor commented 5 years ago

Moved ticket here https://github.com/segabor/SCClient/issues/2