RangerMauve / discovery-swarm-web

Abstracts away discovery-swarm interaction with WebRTC and a websocket gateway.
MIT License
43 stars 9 forks source link

Expose discovery websocket connection #4

Closed dpaez closed 5 years ago

dpaez commented 5 years ago

Hi @RangerMauve would you consider a (simple, I guess) PR that exposes the discovery websocket connection?

This can be useful for observability purposes like checking on the websocket state.

RangerMauve commented 5 years ago

Yeah, that's a great idea.

Maybe have an event get emitted with the discovery swarm stream client instance or whenever the new socket gets created?

dpaez commented 5 years ago

🤔Maybe the former is better. I've been playing with a dat viewer/inspector app and was using this to get the websocket's readyState property.

RangerMauve commented 5 years ago

Yeah, whatever works for you!