WebSocket factory constructor

WebSocket(String url, [ Object protocols ])

Source

@DomName('WebSocket.WebSocket')
@DocsEditable()
factory WebSocket(String url, [Object protocols]) {
  if (protocols != null) {
    return _blink.BlinkWebSocket.instance
        .constructorCallback_2_(url, protocols);
  }
  return _blink.BlinkWebSocket.instance.constructorCallback_1_(url);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/WebSocket/WebSocket.html