Just looking at the documentation of CloseCode makes you think you can just use CloseCode::Protocol(x) with any x for application-defined errors, but these get passed through unchecked, so CloseCode::Protocol(1000) would be equivalent to CloseCode::Normal.
Just looking at the documentation of
CloseCodemakes you think you can just useCloseCode::Protocol(x)with anyxfor application-defined errors, but these get passed through unchecked, soCloseCode::Protocol(1000)would be equivalent toCloseCode::Normal.