coast-team / netflux

JavaScript client and server side transport API based on WebRTC & WebSocket
https://coast-team.github.io/netflux
GNU Affero General Public License v3.0
213 stars 14 forks source link

Add ping/pong for sockets to catch disconnection. #43

Closed kalitine closed 6 years ago

kalitine commented 7 years ago

Current behavior When a WebSocket between two peers is closed abnormally, there is no event for this.

Expected behavior Catch this event.

What is the motivation / use case for changing the behavior? WebSocket are only between Bot & Bot or Bot & Browser. During some MUTE demonstration the bot is deployed on a raspberry pi and we disconnect it from the network (unplug the Ethernet cable or switch off the Wi-Fi) and we want Netflux to be aware of this.