RxJs Observable with WebSocket

前端 未结 4 933
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 14:01

My angular application uses a websocket to communicate with the backend.

In my test case I have 2 client components. The Observable timer prints two different clie

4条回答
  •  有刺的猬
    2020-12-16 15:04

    I was struggling with the built-in websocket feature (maybe it's just me) so I made my own resynkd. It's a work in progress, but so far so good...

    My main goal was to be able to subscribe from either websocket endpoint, and to cover more than just Subject. I can create a BehaviorSubject on the client and subscribe to it on the server (by name...) or I can create a ReplaySubject on the server and subscribe to it on the client, etc.

提交回复
热议问题