Skip to content

v1.0.1

Compare
Choose a tag to compare
@IamLizu IamLizu released this 29 Oct 18:40
· 12 commits to master since this release
v1.0.1
f7c7a66

v1.0.1

  • Clean registerSocketForUser method
    • Add extractUserId method (private): Parses and validates userId from incoming data, throwing an error if userId is missing.
    • Add handleExistingConnection method (private): Checks and disconnects existing sockets for a user, ensuring only one active connection.
    • Add saveUserSocketsToRedis method (private): Manages Redis persistence of active user sockets, updating data after each connection change.
  • Add jsdoc comments to all methods
  • Add example in class documentation
  • Shortened public method names for simplicity:
    • initializeUserSockets is now initialize
    • getUserSockets is now getSockets
    • getUserSocket is now getSocket
    • registerSocketForUser is now register
    • deRegisterSocketForUser is now deregister
    • informSocket remains as inform
  • Deprecated: Original method names remain for backward compatibility but will be removed in future versions. Using these names now triggers a warning.
  • Add missing use of initialize method

What's Changed

  • docs: add history by @IamLizu in #2
  • Refactor/clean code by @IamLizu in #6
  • docs: add js doc and example in class by @IamLizu in #7
  • refactor: simplify methods and add deprecated warning for old methods by @IamLizu in #8
  • docs: add missing instruction step for initialize by @IamLizu in #9

Full Changelog: v1.0.0...v1.0.1