shelf_web_socket
A shelf handler that wires up a listener for every connection.
3.0.0
10M downloads/mo
#24 most downloaded on pub.dev
dart-lang/shelf
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 1.8 years
Nearly every release is documented
notes for 25 of 26 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
26 releases · first in 2014
0 releases in the last 12 months
see the full history below
Release timeline
26 releases · May 2014 to Jan 2025Releases
latest 26-
3.0.030 Jan 2025Release notes
Open source →- BREAKING:: Change the signature of the
webSocketHandlermethod's
onConnectioncallback. Previously this took an untyped function with either
one or two parameters. This now requires aConnectionCallback; a typedef
taking two parameters. See also #457. - Add a API usage example.
- Require Dart
^3.5.0.
Note that most clients seeing analysis issues from the above breaking change can
fix it by adding a second parameter to their callback. So, they would change
this:webSocketHandler((webSocket) { webSocket.stream.listen((message) { webSocket.sink.add('echo $message'); }); });
to this:
webSocketHandler((webSocket, _) { webSocket.stream.listen((message) { webSocket.sink.add('echo $message'); }); });
Release notes
Open source →- BREAKING:: Change the signature of the
webSocketHandlermethod'sonConnectioncallback. Previously this took an untyped function with either one or two parameters. This now requires aConnectionCallback; a typedef taking two parameters. See also https://github.com/dart-lang/shelf/issues/457. - Add a API usage example.
- Require Dart
^3.5.0.
Note that most clients seeing analysis issues from the above breaking change can fix it by adding a second parameter to their callback. So, they would change this:
webSocketHandler((webSocket) { webSocket.stream.listen((message) { webSocket.sink.add('echo $message'); }); });to this:
webSocketHandler((webSocket, _) { webSocket.stream.listen((message) { webSocket.sink.add('echo $message'); }); }); - BREAKING:: Change the signature of the
-
2.0.122 Nov 2024 -
2.0.006 May 2024Release notes
Open source →- BREAKING:: Remove support for hijacking WebSocket requests that are not
being transported using
dart:ioSockets. - Require Dart
^3.0.0.
- BREAKING:: Remove support for hijacking WebSocket requests that are not
being transported using
-
1.0.403 May 2023 -
1.0.303 Nov 2022Release notes
Open source →- Require Dart
2.17. - Fix checking for binary callbacks with strong null safety.
- Require Dart
-
1.0.216 Jun 2022 -
1.0.117 Mar 2021 -
1.0.024 Feb 2021 -
0.2.429 Jan 2021Release notes
Open source →- Support the latest shelf release (
1.x.x). - Require at least Dart 2.1
- Allow omitting
protocolsargument even if theonConnectioncallback takes a second argument.
- Support the latest shelf release (
-
0.2.4+118 Feb 2021 -
0.2.317 Apr 2019Release notes
Open source →- Add
pingIntervalargument towebSocketHandler, to be passed through to the created channel.
- Add
-
0.2.227 Sep 2017 -
0.2.2+115 May 2018 -
0.2.2+201 Jun 2018 -
0.2.2+318 Jul 2018 -
0.2.2+406 Aug 2018Release notes
Open source →- Fix the check for
onConnectionto check the number of arguments and not that the arguments aredynamic.
- Fix the check for
-
0.2.2+527 Mar 2019 -
0.2.111 May 2016 -
0.2.003 Mar 2016Release notes
Open source →- Breaking change:
webSocketHandler()now uses theWebSocketChannelclass defined in theweb_socket_channelpackage, rather than the deprecated class defined inhttp_parser.
- Breaking change:
-
0.1.001 Feb 2016Release notes
Open source →- Breaking change:
webSocketHandler()now passes aWebSocketChannelto theonConnection()callback, rather than a deprecatedCompatibleWebSocket.
- Breaking change:
-
0.0.120 May 2014Nothing published for this version
-
0.0.1+118 Dec 2014Release notes
Open source →- Properly parse the
Connectionheader. This fixes an issue where Firefox was unable to connect.
- Properly parse the
-
0.0.1+205 Mar 2015 -
0.0.1+326 Aug 2015 -
0.0.1+427 Aug 2015 -
0.0.1+514 Dec 2015