onclose method

void onclose(
  1. ClosedCallback callback
)

Registers a handler that will be invoked when the connection is closed.

Implementation

void onclose(ClosedCallback callback) {
  _closedCallbacks.add(callback);
}