Skip to content

Commit 8f2ad43

Browse files
authored
Merge pull request flutter#15 from send-to-friends/master
Fixed issues with README example
2 parents 6ae790a + 6638980 commit 8f2ad43

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22

33
`shelf_web_socket` is a [Shelf][] handler for establishing [WebSocket][]
44
connections. It exposes a single function, [webSocketHandler][], which calls an
5-
`onConnection` callback with a [CompatibleWebSocket][] object for every
5+
`onConnection` callback with a [WebSocketChannel][] object for every
66
connection that's established.
77

88
[Shelf]: https://pub.dartlang.org/packages/shelf
99

1010
[WebSocket]: https://tools.ietf.org/html/rfc6455
1111

12-
[webSocketHandler]: https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/shelf_web_socket/shelf_web_socket.webSocketHandler
12+
[webSocketHandler]: https://pub.dartlang.org/documentation/shelf_web_socket/latest/shelf_web_socket/webSocketHandler.html
1313

14-
[CompatibleWebSocket]: https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/http_parser/http_parser.CompatibleWebSocket
14+
[WebSocketChannel]: https://pub.dartlang.org/documentation/web_socket_channel/latest/web_socket_channel/WebSocketChannel-class.html
1515

1616
```dart
1717
import 'package:shelf/shelf_io.dart' as shelf_io;
1818
import 'package:shelf_web_socket/shelf_web_socket.dart';
19+
import 'package:web_socket_channel/web_socket_channel.dart';
1920
2021
void main() {
2122
var handler = webSocketHandler((webSocket) {
2223
webSocket.stream.listen((message) {
23-
webSocket.add("echo $message");
24+
webSocket.sink.add("echo $message");
2425
});
2526
});
2627

0 commit comments

Comments
 (0)