Skip to content

Return individual WebSocket connections #62

Closed
@bennycode

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?

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