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

implementation of Protobuf for Swift Encodable / Decodable #34

Closed gohossein closed 4 years ago

gohossein commented 4 years ago

At the moment, the centrifuge-swift only support Protobuf protocol, I have an old Swift codebase with JSON protocol that uses Encodable/Decodable and Because it's too much work for me to change that, is it possible to encode/decode Protobuf with Encodable? Is there any library that implements Encodable and Decodable on Protobuf protocol? Any suggestions would be helpful.

FZambia commented 4 years ago

@hnazari1990 hello, you can still send JSON with this library - since JSON payload can be easily transferred inside Protobuf frames. You don't need to encode your application data to Protobuf.

FZambia commented 4 years ago

Closing as no response from op