I would find it useful to get the close code as the WebSocketCommonProtocol.wait_closed future's result.
Currently, I'm wrapping .wait_closed in my use case to be able to return the close code. This could also include the reason. Instead of returning a tuple for these, we could just return the ConnectionClosed instance.
I would find it useful to get the close code as the
WebSocketCommonProtocol.wait_closedfuture's result.Currently, I'm wrapping
.wait_closedin my use case to be able to return the close code. This could also include the reason. Instead of returning a tuple for these, we could just return theConnectionClosedinstance.