You can choose to close the connection by calling the close() method. You can also pass in an optional paramterer (boolean) that tells the connections to autoreconnect if set to true. By default the parameter is set to false.

    var conn = new xsockets.client('ws://localhost:4502');

    // ...
    // ...
    // ...

    // you decide to close the connection for some reason

results matching ""

    No results matching ""