Skip to content

Return individual WebSocket connections #62

Description

@bennycode

When opening a WebSocket connection, I get a clean handle which then can be used to close all open WebSocket connections at once:

return () => cache.forEach(w => w.close(1000, 'Close handle was called', { keepClosed: true }))

That's a great encapsulation but it also prevents me from closing individual WebSocket connections.

In my application I am watching the candles of different trading symbols (ETHBTC, BNBBTC, BNTBTC, ...). Sometimes I want to stop watching a symbol (like BNBBTC) but I cannot stop this WebSocket connection without stopping all the others too. We should find a solution to it. WDYT, @balthazar?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions