Closes the WebSocket connection. Set the optional code and reason arguments to send close information to the remote peer. If they are omitted, the peer will see WebSocketStatus.noStatusReceived code with no reason.
Future close([int? code, String? reason]);
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-io/WebSocket/close.html