close method

Future close (
  1. [int closeCode,
  2. String closeReason]

Closes the web socket connection.

closeCode and closeReason are the close code and reason sent to the remote peer, respectively. If they are omitted, the peer will see a "no status received" code with no reason.


Future close([int closeCode, String closeReason]) =>
    _webSocket.close(closeCode, closeReason);