Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
Fix all strong-mode warnings.
Browse files Browse the repository at this point in the history
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//1975493002 .
  • Loading branch information
nex3 committed May 11, 2016
1 parent 2027ad0 commit b8dde80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.2.1

* Fix all strong-mode warnings.

## 0.2.0

* **Breaking change**: `webSocketHandler()` now uses the
Expand Down
5 changes: 4 additions & 1 deletion lib/src/web_socket_handler.dart
Expand Up @@ -5,6 +5,7 @@
import 'dart:convert';

import 'package:shelf/shelf.dart';
import 'package:stream_channel/stream_channel.dart';
import 'package:web_socket_channel/web_socket_channel.dart';

/// A class that exposes a handler for upgrading WebSocket requests.
Expand Down Expand Up @@ -64,7 +65,9 @@ class WebSocketHandler {
}

var protocol = _chooseProtocol(request);
request.hijack((channel) {
request.hijack((untypedChannel) {
var channel = (untypedChannel as StreamChannel).cast/*<List<int>>*/();

var sink = UTF8.encoder.startChunkedConversion(channel.sink);
sink.add(
"HTTP/1.1 101 Switching Protocols\r\n"
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
@@ -1,11 +1,12 @@
name: shelf_web_socket
version: 0.2.0
version: 0.2.1
author: "Dart Team <misc@dartlang.org>"
homepage: http://github.com/dart-lang/shelf_web_socket
description: >
A WebSocket handler for Shelf.
dependencies:
shelf: ">=0.6.5 <0.8.0"
stream_channel: "^1.4.0"
web_socket_channel: "^1.0.0"
dev_dependencies:
http: ">=0.10.0 <0.12.0"
Expand Down

0 comments on commit b8dde80

Please sign in to comment.