| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 | 6 |
| 7 import 'package:crypto/crypto.dart'; | 7 import 'package:crypto/crypto.dart'; |
| 8 | 8 |
| 9 import '../copy/web_socket_impl.dart'; | 9 import '../copy/web_socket_impl.dart'; |
| 10 import 'channel.dart'; | |
| 11 | 10 |
| 12 /// Use [WebSocketChannel] instead. | 11 /// This class is deprecated. |
| 12 /// |
| 13 /// Use the [`web_socket_channel`][web_socket_channel] package instead. |
| 14 /// |
| 15 /// [web_socket_channel]: https://pub.dartlang.org/packages/web_socket_channel |
| 13 @Deprecated("Will be removed in 3.0.0.") | 16 @Deprecated("Will be removed in 3.0.0.") |
| 14 abstract class CompatibleWebSocket implements Stream, StreamSink { | 17 abstract class CompatibleWebSocket implements Stream, StreamSink { |
| 15 /// The interval for sending ping signals. | 18 /// The interval for sending ping signals. |
| 16 /// | 19 /// |
| 17 /// If a ping message is not answered by a pong message from the peer, the | 20 /// If a ping message is not answered by a pong message from the peer, the |
| 18 /// `WebSocket` is assumed disconnected and the connection is closed with a | 21 /// `WebSocket` is assumed disconnected and the connection is closed with a |
| 19 /// [WebSocketStatus.GOING_AWAY] close code. When a ping signal is sent, the | 22 /// [WebSocketStatus.GOING_AWAY] close code. When a ping signal is sent, the |
| 20 /// pong message must be received within [pingInterval]. | 23 /// pong message must be received within [pingInterval]. |
| 21 /// | 24 /// |
| 22 /// There are never two outstanding pings at any given time, and the next ping | 25 /// There are never two outstanding pings at any given time, and the next ping |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 /// Closes the web socket connection. | 89 /// Closes the web socket connection. |
| 87 /// | 90 /// |
| 88 /// [closeCode] and [closeReason] are the [close code][] and [reason][] sent | 91 /// [closeCode] and [closeReason] are the [close code][] and [reason][] sent |
| 89 /// to the remote peer, respectively. If they are omitted, the peer will see | 92 /// to the remote peer, respectively. If they are omitted, the peer will see |
| 90 /// a "no status received" code with no reason. | 93 /// a "no status received" code with no reason. |
| 91 /// | 94 /// |
| 92 /// [close code]: https://tools.ietf.org/html/rfc6455#section-7.1.5 | 95 /// [close code]: https://tools.ietf.org/html/rfc6455#section-7.1.5 |
| 93 /// [reason]: https://tools.ietf.org/html/rfc6455#section-7.1.6 | 96 /// [reason]: https://tools.ietf.org/html/rfc6455#section-7.1.6 |
| 94 Future close([int closeCode, String closeReason]); | 97 Future close([int closeCode, String closeReason]); |
| 95 } | 98 } |
| OLD | NEW |