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

Unified Diff: lib/src/web_socket_handler.dart

Issue 1758123002: Use the web_socket_channel package. (Closed) Base URL: git@github.com:dart-lang/shelf_web_socket@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 | « lib/shelf_web_socket.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/web_socket_handler.dart
diff --git a/lib/src/web_socket_handler.dart b/lib/src/web_socket_handler.dart
index c0e2c6fb0f38e2f4ff8ee1d5d54e1aa6fcb7538a..b8f94a239a59134c760513c10646f92c129817c0 100644
--- a/lib/src/web_socket_handler.dart
+++ b/lib/src/web_socket_handler.dart
@@ -4,8 +4,8 @@
import 'dart:convert';
-import 'package:http_parser/http_parser.dart';
import 'package:shelf/shelf.dart';
+import 'package:web_socket_channel/web_socket_channel.dart';
/// A class that exposes a handler for upgrading WebSocket requests.
class WebSocketHandler {
@@ -70,7 +70,7 @@ class WebSocketHandler {
"HTTP/1.1 101 Switching Protocols\r\n"
"Upgrade: websocket\r\n"
"Connection: Upgrade\r\n"
- "Sec-WebSocket-Accept: ${CompatibleWebSocket.signKey(key)}\r\n");
+ "Sec-WebSocket-Accept: ${WebSocketChannel.signKey(key)}\r\n");
if (protocol != null) sink.add("Sec-WebSocket-Protocol: $protocol\r\n");
sink.add("\r\n");
« no previous file with comments | « lib/shelf_web_socket.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698