socket.io-client-dart icon indicating copy to clipboard operation
socket.io-client-dart copied to clipboard

socket.onDisconnect listener not Working in [IOS]

Open mmustafaget opened this issue 3 years ago • 0 comments

socket = IO.io(
        '${ServerURLs.socketURL}',
        IO.OptionBuilder()
            .setTransports(['websocket'])
            .disableAutoConnect()
            // .enableForceNewConnection()
            // .enableReconnection()
            // .setReconnectionDelay(5000)
            // .enableForceNew()
            .build(),
      );
socket.onDisconnect((data) {
      debugPrint('Socket ========== isSocketDisconnect: ${socket.connected}');
     
    });

Above event is not listener in IOS when we Turn oFF the WIFI and turn it on Again.

Android => When we turn off the WIFI we fall on this event => socket.onDisconnect() IOS. => When we turn off the WIFI we didn't fall on this event => socket.onDisconnect()

Socket Version: socket_io_client: ^2.0.0

mmustafaget avatar Aug 22 '22 12:08 mmustafaget