HomeX-It / pusher-websocket-flutter

An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS
MIT License
30 stars 22 forks source link

Allow setting of host and port in PusherOptions #2

Closed mirkancal closed 5 years ago

mirkancal commented 5 years ago

Hey guys, first of all I'm glad for this package, using it for a month now.

PusherOptions only takes cluster as a parameter but I need to set host and port.

Can you guys help me to achieve that or add it to the package if you have time to do that?

I've also do some work on it but It gives me connection exception, I'd appreciate some help. https://github.com/mirkancal/pusher-websocket-flutter

MisterJimson commented 5 years ago

Hey. Yes this would need to be added to this package to support that. I took a quick look at your fork and you seem to be going in the right direction. Not sure why you are getting an exception, I have not needed to configure those things for my usage.

We may have some time in the future to add this support, but can't guarantee any timeline.

mirkancal commented 5 years ago

Thank you for quick response. I will try to solve it but helps needed. My frontend guy also uses these options:

enabledTransports: ['ws'],
disabledTransports: ['flash'],
forceTLS: true

I couldn't figure how to set those options. Do you know anything about them?

MisterJimson commented 5 years ago

I know forceTLS can be done with PusherOptions.setEncrypted in the Java SDK. Not familiar with the rest.

gem85247 commented 5 years ago

I'm writing support for AuthenticationMethod, Host, Port, Encrypted & Presence Channels in my fork. Should be working/tested in a few days

gem85247 commented 5 years ago

Alright, tested it on both android & iOS, should be working now @mirkancal 🙂 Made a pr @MisterJimson please review, thx!

MisterJimson commented 5 years ago

Should be good to go in 0.1.0!