Open heshesh2010 opened 3 years ago
Im not able to connect to my laravel-websockets server on local machine using vvalet domain name or computer IP.
` wsHost = '192.168......'; FlutterPusher getPusherClient() { PusherOptions options = PusherOptions( host: wsHost, port: 6001, encrypted: true, cluster: 'us3'); return FlutterPusher(pusherAppKey, options, lazyConnect: true, enableLogging: true); }
echo = new Echo({ 'broadcaster': 'pusher', 'client': pusherClient, "wsHost": wsHost, "httpHost": wsHost, "wsPort": 6001, 'auth': { "headers": {'Authorization': 'Bearer $token'} }, 'authEndpoint': 'https://$wsHost/api/broadcasting/auth', "disableStats": true, "forceTLS": true, "enabledTransports": ['ws', 'wss'] });
` Can anybody give me help ?
It is most likely your app id that is missing. I have that variable in my javascript frontend and it's missing in the flutter version.
Look at your CLI messages on the server. It should tell you.
Hi ,
app stuck on connecting state i'm using:
FlutterPusher getPusherClient() { var options = PusherOptions(host: '10.0.2.2', port: 6001, encrypted: false);
}
void connect() { pusherClient.connect(onConnectionStateChange: this.onConnectionStateChange); }