Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: test/html_test_server.dart

Issue 1747113003: Add an HTML implementation of WebSocketChannel. (Closed) Base URL: git@github.com:dart-lang/web_socket_channel.git@master
Patch Set: Code review changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/html_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ });
+ });
+}
« no previous file with comments | « test/html_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698