socket.io-client-dart
socket.io-client-dart copied to clipboard
Unable to connect to HTTPS Server Server Node JS
I am using this library I am unable to figure out how I can pass SSL Certificate using HTTPS call for Socket IO.
IO.Socket socket = IO.io(SOCKET_URL, OptionBuilder().setTransports(['websocket']).build());
socket.onConnecting(() => print('Connecting...')); socket.on('event', (data) => print('data ' + data.toString())); socket.onDisconnect(() => print('disconnect')); socket.on('connect_error', (data) => print('connect_error ' + data.toString())); socket.on('error', (data) => print('error ' + data.toString()));
socket.onConnect((_) { print('connect'); socket.emit('msg', 'test'); });
The Error which I am getting: Unhandled exception:HandshakeException: Handshake error in client (OS Error:CERTIFICATE_VERIFY_FAILED
Also some time I am getting timeout error.
I would like to thank if someone can assist me how I can resolve that issue?
Thanks
what is the server side socket IO version?
@SBDHERA FYI: https://github.com/rikulo/socket.io-client-dart#cannot-connect-https-server-or-self-signed-certificate-server
Socket connection works fine when connected to localhost(Ex - http://172.20.10.3:4000/), but when connected to url which is hosted on heroku,it stops working. Please help.
Socket connection works fine when connected to localhost(Ex - http://172.20.10.3:4000/), but when connected to url which is hosted on heroku,it stops working. Please help.
Did you fix it? What was the problem?
+1