Closed Sceat closed 10 months ago
writeStatus must come before end
It's standard spec that the websocket client does not display information about the connection open error. If you want to send info about the close to client you need to open connection then immediately close it with code/reason
writeStatus must come before end
I tried both
It's standard spec that the websocket client does not display information about the connection open error. If you want to send info about the close to client you need to open connection then immediately close it with code/reason
Alright I see so we can't optimize that 👍🏻
Ah. Yeah just let the connection open and immediately close it. That is not more costly, anyways and you get a standard way of delivering standard error codes and reason to the client.
I don't see a way to retrieve a cause on the client before the socket was opened.
Server:
Client