close method

void close({
  1. int? status,
  2. String? reason,
})

Closes the socket connection.

status is an optional status code for closing the connection. reason is an optional reason for closing the connection.

Implementation

void close({int? status, String? reason}) {
  _socket.close(status, reason);
}