close method

Future<void> close({
  1. int code = 1001,
  2. String reason = 'Server shutting down',
})

Closes this socket. Server-initiated shutdown defaults to code 1001.

Implementation

Future<void> close({
  int code = 1001,
  String reason = 'Server shutting down',
}) => _shutdown(code: code, reason: reason);