Download Latest Version v2.0.4.zip (31.0 kB)
Email in envelope

Get an email when there's a new version of Sockette

Home / v2.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2018-02-12 1.2 kB
v2.0.0 source code.tar.gz 2018-02-12 28.6 kB
v2.0.0 source code.zip 2018-02-12 29.8 kB
Totals: 3 Items   59.6 kB 0

Breaking

  • You must now instantiate an instance rather than functional helper: 0a9c339

    ```js const Sockette = require('sockette');

    // Don't: let ws = Sockette('...');

    // Do: let ws = new Sockette('...'); ```

  • Sockette no longer returns the underlying WebSocket: 0a9c339

    Instead, it returns itself, keeping the current WebSocket instance protected and out of reach.

    Returning the WebSocket prevented the ability to send new messages after successful reconnects.

Minor

  • NEW: Added opts.onmaximum callback (#11): 712defb, e59b0e7

    This is called when the maxAttempts have been exhausted.

Patches

  • Fixed transmits from Sockette after reconnecting/recovering from failure: 0a9c339

    By hiding the underlying WebSocket, Sockette can safely swap/update instances without invalidating your pointer to initial WebSocket return.

  • A successful reconnection will reset the tracked attempts count: 6d8095a

    Previously, reconnecting after 6 attempts only left you 4 attempts for your next connection failure — assuming a limit of 10.

  • Update README docs: b9d74b0, e656e08, 556fe3e, e59b0e7

Source: README.md, updated 2018-02-12