WebSocket constructor

WebSocket(
  1. String url, [
  2. Object? protocols
])

Implementation

factory WebSocket(String url, [Object? protocols]) {
  if (protocols != null) {
    return WebSocket._create_1(url, protocols);
  }
  return WebSocket._create_2(url);
}