close abstract method

  1. @override
FutureOr<void> close([
  1. int? code = 1000,
  2. String? reason = 'NORMAL_CLOSURE'
])
override

Permanently stops the WebSocket connection and frees all resources. After calling this method the WebSocket client is no longer usable.

Use disconnect to temporarily close the connection. And reconnect with connect method later.

Implementation

@override
FutureOr<void> close([int? code = 1000, String? reason = 'NORMAL_CLOSURE']);