pub fn close_with_status(&self, code: SocketCloseCode, reason: &str) -> Result<(), CloseError> {
        js_try!( @(no_return)
            @{self}.close(@{code.0}, @{reason});
        ).unwrap()
    }
/// Closes the WebSocket connection or connection attempt, if any. If the connection
/// is already CLOSED, this method does nothing.
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#close())
// https://html.spec.whatwg.org/#the-websocket-interface:dom-websocket-close
Closes the WebSocket connection or connection attempt, if any. If the connection
is already CLOSED, this method does nothing.


Closes the WebSocket connection or connection attempt if any . If the connection is already CLOSED this method does nothing .
pub fn close_with_status(&self, code: SocketCloseCode, reason: &str) -> Result<(), CloseError> {
        js_try!( @(no_return)
            @{self}.close(@{code.0}, @{reason});
        ).unwrap()
    }
pub fn close_with_status ( & self , code : SocketCloseCode , reason : & str ) -> Result < ( ) , CloseError > { js_try ! ( ( no_return ) { self } close ( { code 0 } { reason } ) ) . unwrap ( ) }
Closes the WebSocket connection or connection attempt, if any.
Closes the WebSocket connection or connection attempt if any .
&self
code
SocketCloseCode
reason
&str
&self
code
SocketCloseCode
reason
&str