Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan to support https server-sent-events? #86

Open
kristofradi opened this issue Jan 26, 2024 · 1 comment
Open

Plan to support https server-sent-events? #86

kristofradi opened this issue Jan 26, 2024 · 1 comment

Comments

@kristofradi
Copy link

kristofradi commented Jan 26, 2024

https://centrifugal.dev/docs/transports/uni_sse

Would be great if the dart side would support the uni_sse communication as well

Have you any plan with this?

@FZambia
Copy link
Member

FZambia commented Jan 26, 2024

Hello, unidirectional transports in Centrifugo are supposed to work without custom real-time SDK from Centrifugal Labs side. We provide SDKs for bidirectional transports. The main intent of providing unidirectional transports was the ability to use them just with raw SSE, or WebSocket transports, without dependency on a more complex bidirectional SDK.

So I believe you can simply use sth like https://pub.dev/packages/flutter_client_sse or similar to consume events from Centrifugo unidirectional SSE. Just follow some semantics described in the doc for unidirectional transports: https://centrifugal.dev/docs/transports/overview#unidirectional

Of course you can wrap SSE client to simplify communication with Centrifugo - to manage some protocol conventions we have for unidirectional protocol inside the wrapper. I am not sure we can provide such official wrappers for different languages for Centrifugo users in near future. Probably in the bright future. But again - you can already use unidirectional SSE - just follow our unidirectional protocol description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants