You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
possible to have the equivalent of js signalr client "@microsoft/signalr" autoreconnect feature ?
const connection = new signalR.HubConnectionBuilder()
.withUrl("/chatHub") .withAutomaticReconnect()
.build();
I didn't find any disconnect catcher, so after a while, when connection is lost, i can't do anything to reconnect the user.
The text was updated successfully, but these errors were encountered:
Although a disconnect method isn't mentioned in the react-native-signalr documentation (only on 'connectionSlow'), as it mainly acts as a bridge between react native and jQuery signalR, the other methods also work such as on 'disconnected' and on 'stateChanged' e.g:
connection.disconnected(() => {
//connection was fully disconnected
});
connection.stateChanged((state) => {
// Detects any stage change
// state = {oldState, newState}
});
Also a very useful tip - you can access the connection state at any time through connection.state.
Status code 1: Connected
Status code 2: Reconnecting
Status code 4: Disconnected
Hi,
possible to have the equivalent of js signalr client "@microsoft/signalr" autoreconnect feature ?
const connection = new signalR.HubConnectionBuilder()
.withUrl("/chatHub")
.withAutomaticReconnect()
.build();
I didn't find any disconnect catcher, so after a while, when connection is lost, i can't do anything to reconnect the user.
The text was updated successfully, but these errors were encountered: