Open AliEasy opened 3 years ago
Well I tried the example app on both Android & iOS. isConnected
seems to be working fine for me.
Ok so I will test it again and let you know
this may prove that isConnected()
not working properly
this is my code:
SignalR signalR = SignalR(
'<Your server url here>',
"<Your hub name here>",
hubMethods: ["hubMethod1", "hubMethod2"]
statusChangeCallback: (status) => print(status),
hubCallback: (methodName, message) => print('MethodName = $methodName, Message = $message'));
while(await _signalR.isConnected){
_signalR.stop();
print('stop');
}
and the output is:
and it Does not stop printing 'stop'
Hi. Thanks for adding
isConnected()
feature, but its not working as expectedBefore calling
connect()
I checkisConnected()
to avoid multi calls butisConnected()
always returns true even if signal r is not connectedAnd I know its not connected because by using
hubCallback.call('hub_name', 'hub_method')
nothing happens and also Im not getting any call backs from hubMy Code