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

Side by Side Diff: lib/src/channel.dart

Issue 1959433002: Fix all strong-mode errors and warnings. (Closed) Base URL: git@github.com:dart-lang/web_socket_channel.git@master
Patch Set: Created 4 years, 7 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 | « lib/io.dart ('k') | pubspec.yaml » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert' as convert; 6 import 'dart:convert' as convert;
7 7
8 import 'package:async/async.dart'; 8 import 'package:async/async.dart';
9 import 'package:crypto/crypto.dart'; 9 import 'package:crypto/crypto.dart';
10 import 'package:stream_channel/stream_channel.dart'; 10 import 'package:stream_channel/stream_channel.dart';
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 /// The sink exposed by a [WebSocketChannel]. 99 /// The sink exposed by a [WebSocketChannel].
100 /// 100 ///
101 /// This is like a normal [StreamSink], except that it supports extra arguments 101 /// This is like a normal [StreamSink], except that it supports extra arguments
102 /// to [close]. 102 /// to [close].
103 class WebSocketSink extends DelegatingStreamSink { 103 class WebSocketSink extends DelegatingStreamSink {
104 final WebSocketImpl _webSocket; 104 final WebSocketImpl _webSocket;
105 105
106 WebSocketSink._(WebSocketImpl webSocket) 106 WebSocketSink._(WebSocketImpl webSocket)
107 : super(webSocket), 107 : _webSocket = webSocket,
108 _webSocket = webSocket; 108 super(webSocket);
109 109
110 /// Closes the web socket connection. 110 /// Closes the web socket connection.
111 /// 111 ///
112 /// [closeCode] and [closeReason] are the [close code][] and [reason][] sent 112 /// [closeCode] and [closeReason] are the [close code][] and [reason][] sent
113 /// to the remote peer, respectively. If they are omitted, the peer will see 113 /// to the remote peer, respectively. If they are omitted, the peer will see
114 /// a "no status received" code with no reason. 114 /// a "no status received" code with no reason.
115 /// 115 ///
116 /// [close code]: https://tools.ietf.org/html/rfc6455#section-7.1.5 116 /// [close code]: https://tools.ietf.org/html/rfc6455#section-7.1.5
117 /// [reason]: https://tools.ietf.org/html/rfc6455#section-7.1.6 117 /// [reason]: https://tools.ietf.org/html/rfc6455#section-7.1.6
118 Future close([int closeCode, String closeReason]) => 118 Future close([int closeCode, String closeReason]) =>
119 _webSocket.close(closeCode, closeReason); 119 _webSocket.close(closeCode, closeReason);
120 } 120 }
OLDNEW
« no previous file with comments | « lib/io.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698