close abstract method

Future<void> close({
  1. int? code,
  2. String? reason,
})

Starts local close with an optional valid code and reason.

Repeated calls are idempotent and return the same close operation. The public connector adapters accept code 1000 or application codes 3000..4999, and a reason no longer than 123 UTF-8 bytes; a reason must be accompanied by a code. The requested local values are available from done if the provider does not report a different peer close first.

Implementation

Future<void> close({int? code, String? reason});