ACINQ / phoenixd

https://phoenix.acinq.co/server
Apache License 2.0
113 stars 14 forks source link

Standardize websocket messages #90

Open ktecho opened 2 months ago

ktecho commented 2 months ago

I get different structures for the messages received in the websocket:

{data: Array, type: "Ping"}
{data: {code: 1000, reason: "Disconnected by client"}, type: "Close"}
"WebSocket protocol error: Connection reset without closing handshake"

The first 2 ones are consistent in that they have a type and a data fields, but the last one is a string. Would it be possible to also return type: "websocket-closed".