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"; |
-} |