accept method

void accept({
  1. String? protocol,
})

Completes the handshake.

Implementation

void accept({String? protocol}) {
  if (_accepted || _ended) return;
  _accepted = true;
  _later(() => _listener.onOpen(protocol));
}