centrifuge-dart icon indicating copy to clipboard operation
centrifuge-dart copied to clipboard

Web support

Open r-oman-G opened this issue 3 years ago • 12 comments

Create IWebSocket interface with similar methods in dart:html and dart:io WebSocket. This is have not a big difference between. Test's work normally. Trade-offs noticed: dart:html WebSocket should not use 'protocols' because in this case server will not response. And dart:html WebSocket should use binaryType = 'arraybuffer';

r-oman-G avatar Sep 02 '21 14:09 r-oman-G

@r-oman-G thanks, looks very promising! Could you please add a detailed pr description to describe things you done and maybe any trade-offs you noticed?

FZambia avatar Sep 02 '21 15:09 FZambia

@FZambia hi, thanks for fast answer. Update pull request

r-oman-G avatar Sep 04 '21 10:09 r-oman-G

Trade-offs noticed: dart:html WebSocket should not use 'protocols' because in this case server will not response.

Did you find the underlying reason of this? Would be nice to use centrifuge-protobuf subprotocol to avoid using ?format=protobuf in URL.

Also, plz run dartfmt -w lib/ test/ as CI currently fails.

FZambia avatar Sep 05 '21 06:09 FZambia

Did you find the underlying reason of this? Would be nice to use centrifuge-protobuf subprotocol to avoid using ?format=protobuf in URL.

yes, if we do it when we create webSocket then server will not response. Or response something like this "server can't response, try again". I'm try it many times, but anywey dart:html WebSockets can't read our request, if we use protocol during creation WebSockets

Also, plz run dartfmt -w lib/ test/ as CI currently fails.

Okay, I we'll do it tomorrow

r-oman-G avatar Sep 06 '21 18:09 r-oman-G

"server can't response, try again". I'm try it many times, but anywey dart:html WebSockets can't read our request, if we use protocol during creation WebSockets

On the server side you are using Centrifugo v2 right? Subprotocol only handled by Centrifugo v3 - maybe thats the reason.

FZambia avatar Sep 07 '21 05:09 FZambia

"server can't response, try again". I'm try it many times, but anywey dart:html WebSockets can't read our request, if we use protocol during creation WebSockets

On the server side you are using Centrifugo v2 right? Subprotocol only handled by Centrifugo v3 - maybe thats the reason.

maybe you right, cause i'm test centrifugo only with one server. By the way we use centrifugo v2

r-oman-G avatar Sep 08 '21 08:09 r-oman-G

Also, plz run dartfmt -w lib/ test/ as CI currently fails.

Still actual. @r-oman-G are you still interested in getting this merged?

FZambia avatar Sep 19 '21 08:09 FZambia

yts i will. Sorry for that, I have no time. I will try try it in next week

вс, 19 сент. 2021 г. в 11:45, Alexander Emelin @.***>:

Also, plz run dartfmt -w lib/ test/ as CI currently fails.

Still actual. @r-oman-G https://github.com/r-oman-G are you still interested in getting this merged?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/centrifugal/centrifuge-dart/pull/53#issuecomment-922438080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJI4TE26J6JJRHC6M4JIXZTUCWPIZANCNFSM5DJII4QA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

r-oman-G avatar Sep 19 '21 12:09 r-oman-G

Thx, no rush - just wanted to understand the status.

FZambia avatar Sep 19 '21 12:09 FZambia

There was a problem in CI which resulted in error, need to merge master – and tests should pass.

FZambia avatar Oct 19 '21 08:10 FZambia

Any updates?

adimshev avatar Aug 31 '22 20:08 adimshev

This is still awesome to have, but needs to be addressed over latest version of SDK. So whether this PR should be updated or a new one created.

FZambia avatar Sep 02 '22 13:09 FZambia

Closing in favour of #73

FZambia avatar Jan 29 '23 11:01 FZambia