Client real-time SDKs
In the previous chapter we investigated common principles of Centrifugo client SDK API. Here we will provide a list of available bidirectional connectors you can use to communicate with Centrifugo.
No need in clients for unidirectional approach
Client libraries listed here speak Centrifugo bidirectional protocol (WebSocket). If you aim to use unidirectional approach you don't need client connectors – just use standard APIs. See the difference here.
List of client SDKs​
- centrifuge-js – for browser, NodeJS and React Native
- centrifuge-go - for Go language
- centrifuge-dart - for Dart and Flutter
- centrifuge-swift – for native iOS development
- centrifuge-java – for native Android development and general Java
See a description of client protocol if you want to write a custom client bidirectional connector.
SDK feature matrix​
Below you can find an information regarding support of different features in our official client SDKs
Connection related features​
Client feature | js | dart | swift | go | java |
---|---|---|---|---|---|
connect to a server | ✅ | ✅ | ✅ | ✅ | ✅ |
setting client options | ✅ | ✅ | ✅ | ✅ | ✅ |
automatic reconnect with backoff algorithm | ✅ | ✅ | ✅ | ✅ | ✅ |
client state changes | ✅ | ✅ | ✅ | ✅ | ✅ |
command-reply | ✅ | ✅ | ✅ | ✅ | ✅ |
command timeouts | ✅ | ✅ | ✅ | ✅ | ✅ |
async pushes | ✅ | ✅ | ✅ | ✅ | ✅ |
ping-pong | ✅ | ✅ | ✅ | ✅ | ✅ |
connection token refresh | ✅ | ✅ | ✅ | ✅ | ✅ |
handle disconnect advice from server | ✅ | ✅ | ✅ | ✅ | ✅ |
server-side subscriptions | ✅ | ✅ | ✅ | ✅ | ✅ |
Client-side subscription related features​
Client feature | js | dart | swift | go | java |
---|---|---|---|---|---|
subscrbe to a channel | ✅ | ✅ | ✅ | ✅ | ✅ |
setting subscription options | ✅ | ✅ | ✅ | ✅ | ✅ |
automatic resubscribe with backoff algorithm | ✅ | ✅ | ✅ | ✅ | ✅ |
subscription state changes | ✅ | ✅ | ✅ | ✅ | ✅ |
subscription command-reply | ✅ | ✅ | ✅ | ✅ | ✅ |
subscription async pushes | ✅ | ✅ | ✅ | ✅ | ✅ |
subscription token refresh | ✅ | ✅ | ✅ | ✅ | ✅ |
handle unsubscribe advice from server | ✅ | ✅ | ✅ | ✅ | ✅ |
manage subscription registry | ✅ | ✅ | ✅ | ✅ | ✅ |