File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change
1
+ analyzer :
2
+ strong-mode : true
Original file line number Diff line number Diff line change 5
5
import 'dart:convert' ;
6
6
7
7
import 'package:shelf/shelf.dart' ;
8
- import 'package:stream_channel/stream_channel.dart' ;
9
8
import 'package:web_socket_channel/web_socket_channel.dart' ;
10
9
11
10
/// A class that exposes a handler for upgrading WebSocket requests.
@@ -65,9 +64,7 @@ class WebSocketHandler {
65
64
}
66
65
67
66
var protocol = _chooseProtocol (request);
68
- request.hijack ((untypedChannel) {
69
- var channel = (untypedChannel as StreamChannel ).cast <List <int >>();
70
-
67
+ request.hijack ((channel) {
71
68
var sink = UTF8 .encoder.startChunkedConversion (channel.sink);
72
69
sink.add (
73
70
"HTTP/1.1 101 Switching Protocols\r\n "
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ homepage: http://github.com/dart-lang/shelf_web_socket
5
5
description : >
6
6
A WebSocket handler for Shelf.
7
7
dependencies :
8
- shelf : " >=0.6.5 <0.8.0"
8
+ shelf : " >=0.7.0 <0.8.0"
9
9
stream_channel : " ^1.4.0"
10
10
web_socket_channel : " ^1.0.0"
11
11
dev_dependencies :
You can’t perform that action at this time.
0 commit comments