start method

Future start (
  1. {WebSocketHandler handleWs: null,
  2. FallbackStart fallback}
)

This method helps to start your webserver.

You can add a WebSocketHandler.

Implementation

Future start({WebSocketHandler handleWs: null, FallbackStart fallback}) {
  HttpServer.bind(bind_address, port).then((server) {
    _onStartComplete(server, handleWs);
  }).catchError((e) {
    if (fallback==null) {
      var error = _errorOnStart(e);
      return new Future.error(error);
    } else {
      fallback(this, handleWs);
    }
  });

  return _completer.future;
}