pusher / NWWebSocket

A WebSocket client written in Swift, using the Network framework from Apple.
MIT License
123 stars 25 forks source link

Any plan to support also Server? #22

Open malcommac opened 3 years ago

malcommac commented 3 years ago

Hi guys, Thank you for your work. Is there any plan to support also websocket server?

danielrbrowne commented 3 years ago

Are you referring to exposing NWWebSocketSever via the public API?

If so, do you have a use case in mind? In its current implementation the server isn't really suitable for use outside of the unit tests as it has too many baked-in assumptions IMHO. However, in the future a server object could be made available via the public API if there is a demand for it.

malcommac commented 3 years ago

Yeah. Currently there are several implementation of websocket client for iOS, few using SwiftNIO.
However there is only one implementation (Telegraph from the far I know) which support even the server side.
SwiftNIO allows to create both server and client and I think it's a nice addition to the library supports both of them. I'm working on a software which needs a server on macOS and an iOS client and currently there aren't so many options to use. Thanks.