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

Side by Side Diff: sdk/lib/io/websocket.dart

Issue 14696012: Make web-socket pass AutobanhTestSuite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * Web socket status codes used when closing a web socket connection. 8 * Web socket status codes used when closing a web socket connection.
9 */ 9 */
10 abstract class WebSocketStatus { 10 abstract class WebSocketStatus {
(...skipping 16 matching lines...) Expand all
27 * The [WebSocketTransformer] provides the ability to upgrade a 27 * The [WebSocketTransformer] provides the ability to upgrade a
28 * [HttpRequest] to a [WebSocket] connection. It supports both 28 * [HttpRequest] to a [WebSocket] connection. It supports both
29 * upgrading a single [HttpRequest] and upgrading a stream of 29 * upgrading a single [HttpRequest] and upgrading a stream of
30 * [HttpRequest]s. 30 * [HttpRequest]s.
31 * 31 *
32 * To upgrade a single [HttpRequest] use the static [upgrade] method. 32 * To upgrade a single [HttpRequest] use the static [upgrade] method.
33 * 33 *
34 * HttpServer server; 34 * HttpServer server;
35 * server.listen((request) { 35 * server.listen((request) {
36 * if (...) { 36 * if (...) {
37 * WebSocketTransformer.upgrade(request).then(websocket) { 37 * WebSocketTransformer.upgrade(request).then((websocket) {
38 * ... 38 * ...
39 * } 39 * });
40 * } else { 40 * } else {
41 * // Do normal HTTP request processing. 41 * // Do normal HTTP request processing.
42 * } 42 * }
43 * }); 43 * });
44 * 44 *
45 * To transform a stream of [HttpRequest] events as it implements a 45 * To transform a stream of [HttpRequest] events as it implements a
46 * stream transformer that transforms a stream of HttpRequest into a 46 * stream transformer that transforms a stream of HttpRequest into a
47 * stream of WebSockets by upgrading each HttpRequest from the HTTP or 47 * stream of WebSockets by upgrading each HttpRequest from the HTTP or
48 * HTTPS server, to the WebSocket protocol. 48 * HTTPS server, to the WebSocket protocol.
49 * 49 *
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 */ 151 */
152 Future addStream(Stream stream); 152 Future addStream(Stream stream);
153 } 153 }
154 154
155 155
156 class WebSocketException implements Exception { 156 class WebSocketException implements Exception {
157 const WebSocketException([String this.message = ""]); 157 const WebSocketException([String this.message = ""]);
158 String toString() => "WebSocketException: $message"; 158 String toString() => "WebSocketException: $message";
159 final String message; 159 final String message;
160 } 160 }
OLDNEW
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698