If the websocket is connected, attempts to close the websocket gracefully and asynchronously by sending a close frame with code and reason. In all cases, release its resources.
Sends a binary message asynchronously.
Sends a text message asynchronously.