close method - WebSocket class - dart:io library (original) (raw)

description

close abstract method

Future close([

  1. int? code,
  2. String? reason ])

override

Closes the WebSocket connection. Set the optional code and reasonarguments to send close information to the remote peer. If they are omitted, the peer will see WebSocketStatus.noStatusReceived code with no reason.

Implementation

Future close([int? code, String? reason]);