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

Side by Side Diff: lib/shelf_web_socket.dart

Issue 1587433002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/shelf_web_socket@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | lib/src/web_socket_handler.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library shelf_web_socket;
6
7 import 'package:shelf/shelf.dart'; 5 import 'package:shelf/shelf.dart';
8 6
9 import 'src/web_socket_handler.dart'; 7 import 'src/web_socket_handler.dart';
10 8
11 /// A typedef used to determine if a function takes two arguments or not. 9 /// A typedef used to determine if a function takes two arguments or not.
12 typedef _BinaryFunction(arg1, arg2); 10 typedef _BinaryFunction(arg1, arg2);
13 11
14 /// Creates a Shelf handler that upgrades HTTP requests to WebSocket 12 /// Creates a Shelf handler that upgrades HTTP requests to WebSocket
15 /// connections. 13 /// connections.
16 /// 14 ///
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 throw new ArgumentError("If protocols is non-null, onConnection must " 50 throw new ArgumentError("If protocols is non-null, onConnection must "
53 "take two arguments, the WebSocket and the protocol."); 51 "take two arguments, the WebSocket and the protocol.");
54 } 52 }
55 53
56 var innerOnConnection = onConnection; 54 var innerOnConnection = onConnection;
57 onConnection = (webSocket, _) => innerOnConnection(webSocket); 55 onConnection = (webSocket, _) => innerOnConnection(webSocket);
58 } 56 }
59 57
60 return new WebSocketHandler(onConnection, protocols, allowedOrigins).handle; 58 return new WebSocketHandler(onConnection, protocols, allowedOrigins).handle;
61 } 59 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/web_socket_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698