olubunmitosin / laravel_flutter_pusher

An easy pusher package for use with Laravel Echo. Supports Null satefy
MIT License
6 stars 15 forks source link

Keeps Reconnecting #13

Closed trimmytech closed 2 years ago

trimmytech commented 2 years ago

Hello , first of all, thank you for this wonderful package.

Any time i use the below code , my app connect to the laravel websocket succesfully on android but nothing happens on ios :

var options = PusherOptions( host: PusherConfig.host, port: 6001, encrypted: false, cluster: 'eu');

LaravelFlutterPusher pusher = LaravelFlutterPusher(
    PusherConfig.appKey, options,
    enableLogging: true);
//
pusher
    .subscribe('channel')
    .bind('event', (event) => print('event =>' + event.toString()));

so i decide to use it with laravel_echo package , maybe that is the issue but anytime i combine the code with the echo , it doesnt work , it just keep writing connecting....reconnecting..connecting....reconnecting..connecting....reconnecting....

below is the code with echo

var options = PusherOptions( host: PusherConfig.host, port: 6001, encrypted: false, cluster: 'eu');

LaravelFlutterPusher pusher = LaravelFlutterPusher(
    PusherConfig.appKey, options,
    enableLogging: true);

Echo echo = new Echo({ 'broadcaster': 'pusher', 'client': pusher, });

echo.channel('public-channel').listen('PublicEvent', (e) { print(e); });

Please assist. Thanks

trimmytech commented 2 years ago

pardon me please , i entered wrong host in the configuration

olubunmitosin commented 2 years ago

Happy that you got it working. Nevertheless, I will work on the package and improve it further to make it easier to use.

Regards!

On Mon, Oct 17, 2022, 8:45 PM Agbeniga Musefiu @.***> wrote:

Closed #13 https://github.com/olubunmitosin/laravel_flutter_pusher/issues/13 as completed.

— Reply to this email directly, view it on GitHub https://github.com/olubunmitosin/laravel_flutter_pusher/issues/13#event-7605342519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDKYNAOGGY456HOVOA4DKLWDWUG3ANCNFSM6AAAAAARHLW6PM . You are receiving this because you are subscribed to this thread.Message ID: <olubunmitosin/laravel_flutter_pusher/issue/13/issue_event/7605342519@ github.com>

trimmytech commented 2 years ago

Thank you for your work. It would be so much nice if we can be able to trigger an event to the subscribed channel too

olubunmitosin commented 2 years ago

Alright. Thanks for the feedback.

On Tue, Oct 18, 2022, 1:20 PM Agbeniga Musefiu @.***> wrote:

Thank you for your work. It would be so much nice if we can be able to trigger an event to the subscribed channel too

— Reply to this email directly, view it on GitHub https://github.com/olubunmitosin/laravel_flutter_pusher/issues/13#issuecomment-1282295905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDKYNG52UBET6C3OWTZR7TWD2IY5ANCNFSM6AAAAAARHLW6PM . You are receiving this because you commented.Message ID: @.***>