Index: test/html_test_server.dart |
diff --git a/test/html_test_server.dart b/test/html_test_server.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e356695310fdeb3f8be3ca5051a6124c644e7456 |
--- /dev/null |
+++ b/test/html_test_server.dart |
@@ -0,0 +1,16 @@ |
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import 'dart:io'; |
+ |
+main() async { |
+ var server = await HttpServer.bind("localhost", 1234); |
+ server.transform(new WebSocketTransformer()).listen((webSocket) { |
+ print("connected"); |
+ webSocket.listen((request) { |
+ print("got $request"); |
+ webSocket.add(request); |
+ }); |
+ }); |
+} |