reject method

void reject(
  1. int statusCode, {
  2. Map<String, String> headers = const {},
})

Fails the handshake with HTTP statusCode.

Implementation

void reject(int statusCode, {Map<String, String> headers = const {}}) => fail(
  WebSocketHandshakeException(
    'Unexpected HTTP status $statusCode',
    statusCode: statusCode,
    headers: headers,
  ),
);