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

Unified Diff: lib/src/web_socket/deprecated.dart

Issue 1646583003: Add a WebSocketChannel class. (Closed) Base URL: git@github.com:dart-lang/http_parser@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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/web_socket/channel.dart ('k') | lib/src/web_socket/exception.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/web_socket/deprecated.dart
diff --git a/lib/src/web_socket.dart b/lib/src/web_socket/deprecated.dart
similarity index 81%
copy from lib/src/web_socket.dart
copy to lib/src/web_socket/deprecated.dart
index a11840c09f523322c9b0f3095ddea6ee98c7a102..c2162d7be9955b59f02a04fa66e686e012b1918f 100644
--- a/lib/src/web_socket.dart
+++ b/lib/src/web_socket/deprecated.dart
@@ -6,17 +6,11 @@ import 'dart:async';
import 'package:crypto/crypto.dart';
-import 'copy/web_socket_impl.dart';
+import '../copy/web_socket_impl.dart';
+import 'channel.dart';
-/// An implementation of the WebSocket protocol that's not specific to "dart:io"
-/// or to any particular HTTP API.
-///
-/// Because this is HTTP-API-agnostic, it doesn't handle the initial [WebSocket
-/// handshake][]. This needs to be handled manually by the user of the code.
-/// Once that's been done, [new CompatibleWebSocket] can be called with the
-/// underlying socket and it will handle the remainder of the protocol.
-///
-/// [WebSocket handshake]: https://tools.ietf.org/html/rfc6455#section-4
+/// Use [WebSocketChannel] instead.
+@Deprecated("Will be removed in 3.0.0.")
abstract class CompatibleWebSocket implements Stream, StreamSink {
/// The interval for sending ping signals.
///
@@ -99,14 +93,3 @@ abstract class CompatibleWebSocket implements Stream, StreamSink {
/// [reason]: https://tools.ietf.org/html/rfc6455#section-7.1.6
Future close([int closeCode, String closeReason]);
}
-
-/// An exception thrown by [CompatibleWebSocket].
-class CompatibleWebSocketException implements Exception {
- final String message;
-
- CompatibleWebSocketException([this.message]);
-
- String toString() => message == null
- ? "CompatibleWebSocketException" :
- "CompatibleWebSocketException: $message";
-}
« no previous file with comments | « lib/src/web_socket/channel.dart ('k') | lib/src/web_socket/exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698