centrifugal / centrifuge-swift

Swift client SDK for bidirectional real-time communication with Centrifugo and Centrifuge-based server over WebSocket
MIT License
47 stars 41 forks source link

Embed Starscream 3 #53

Closed FZambia closed 2 years ago

FZambia commented 2 years ago

Relates #48

Looking at Starscream issue tracker migration to StarScream 4 can result in some connection problems. This requires a bit more consideration in general. Maybe there is a better alternative these days?

Since we already have dependency conflicts mentioned in #48 I think for now we can embed Starscream 3 to SwiftCentrifuge.

Removed all public and open access level identifiers.

fedulvtubudul commented 2 years ago

There is an official WebSocket implementation from Apple https://developer.apple.com/documentation/foundation/urlsessionwebsockettask. Possible reason to avoid it for now is that it is iOS 13+ compatible, while centrifuge-swift is declared to support iOS 9+.

So in ideal world I would suggest isolating WebSockets transport into an abstraction with several possible implementations like Starscream 3 for those who needs older systems support or URLSession's WebSockets for those who are ready to drop everything below iOS 13.

FZambia commented 2 years ago

Yeah, I think moving to the official WS implementation is a good thing. Starscream 4 already does this internally - so I'd say we can use it eventually, but need to research a bit. Maybe there is an actively developed fork of it.