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

Side by Side Diff: lib/io/websocket_impl.dart

Issue 11337019: Use patching for dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 const String _webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; 5 const String _webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
6 6
7 class _WebSocketMessageType { 7 class _WebSocketMessageType {
8 static const int NONE = 0; 8 static const int NONE = 0;
9 static const int BINARY = 1; 9 static const int BINARY = 1;
10 static const int TEXT = 2; 10 static const int TEXT = 2;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 break; 202 break;
203 203
204 default: 204 default:
205 throw new WebSocketException("Protocol error"); 205 throw new WebSocketException("Protocol error");
206 } 206 }
207 } 207 }
208 208
209 // Hack - as we always do index++ below. 209 // Hack - as we always do index++ below.
210 index--; 210 index--;
211 break;
Anders Johnsen 2012/10/30 10:43:06 This looks wrong to me. If you break here, the 'ha
Mads Ager (google) 2012/10/30 11:12:40 This is the end of a switch case, so the only thin
211 } 212 }
212 213
213 // Move to the next byte. 214 // Move to the next byte.
214 index++; 215 index++;
215 } 216 }
216 } catch (e) { 217 } catch (e) {
217 if (onClosed !== null) onClosed(WebSocketStatus.PROTOCOL_ERROR, 218 if (onClosed !== null) onClosed(WebSocketStatus.PROTOCOL_ERROR,
218 "Protocol error"); 219 "Protocol error");
219 _state = FAILURE; 220 _state = FAILURE;
220 } 221 }
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 864
864 class _WebSocketCloseEvent implements CloseEvent { 865 class _WebSocketCloseEvent implements CloseEvent {
865 _WebSocketCloseEvent(this._wasClean, this._code, this._reason); 866 _WebSocketCloseEvent(this._wasClean, this._code, this._reason);
866 bool get wasClean => _wasClean; 867 bool get wasClean => _wasClean;
867 int get code => _code; 868 int get code => _code;
868 String get reason => _reason; 869 String get reason => _reason;
869 bool _wasClean; 870 bool _wasClean;
870 int _code; 871 int _code;
871 String _reason; 872 String _reason;
872 } 873 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698