close method

Future close ([int closeCode, String closeReason ])
override

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.

Implementation

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