Skip to content

Commit bbfce40

Browse files
authored
Add a reference to AdapterWebSocketChannel for WebSocketChannel users (#1297)
1 parent 7f21111 commit bbfce40

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

pkgs/cupertino_http/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.5.2-wip
2+
13
## 1.5.1
24

35
* Allow `1000` as a `code` argument in `CupertinoWebSocket.close`.

pkgs/cupertino_http/lib/src/cupertino_web_socket.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ class ConnectionException extends WebSocketException {
2323
/// A [WebSocket] implemented using the
2424
/// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask).
2525
///
26-
/// NOTE: the [WebSocket] interface is currently experimental and may change in
27-
/// the future.
26+
/// > [!NOTE]
27+
/// > The [WebSocket] interface is currently experimental and may change in the
28+
/// > future.
2829
///
2930
/// ```dart
3031
/// import 'package:cupertino_http/cupertino_http.dart';
@@ -47,6 +48,11 @@ class ConnectionException extends WebSocketException {
4748
/// });
4849
/// }
4950
/// ```
51+
///
52+
/// > [!TIP]
53+
/// > [`AdapterWebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/adapter_web_socket_channel/AdapterWebSocketChannel-class.html)
54+
/// > can be used to adapt a [CupertinoWebSocket] into a
55+
/// > [`WebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/web_socket_channel/WebSocketChannel-class.html).
5056
class CupertinoWebSocket implements WebSocket {
5157
/// Create a new WebSocket connection using the
5258
/// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask).

pkgs/cupertino_http/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cupertino_http
2-
version: 1.5.1
2+
version: 1.5.2-wip
33
description: >-
44
A macOS/iOS Flutter plugin that provides access to the Foundation URL
55
Loading System.

pkgs/ok_http/lib/src/ok_http_web_socket.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import 'jni/bindings.dart' as bindings;
1515
/// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html)
1616
/// API.
1717
///
18+
/// > [!NOTE]
19+
/// > The [WebSocket] interface is currently experimental and may change in the
20+
/// > future.
21+
///
1822
/// Example usage of [OkHttpWebSocket]:
1923
/// ```dart
2024
/// import 'package:ok_http/ok_http.dart';
@@ -37,6 +41,11 @@ import 'jni/bindings.dart' as bindings;
3741
/// });
3842
/// }
3943
/// ```
44+
///
45+
/// > [!TIP]
46+
/// > [`AdapterWebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/adapter_web_socket_channel/AdapterWebSocketChannel-class.html)
47+
/// > can be used to adapt a [OkHttpWebSocket] into a
48+
/// > [`WebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/web_socket_channel/WebSocketChannel-class.html).
4049
class OkHttpWebSocket implements WebSocket {
4150
late bindings.OkHttpClient _client;
4251
late final bindings.WebSocket _webSocket;

0 commit comments

Comments
 (0)