PackageTrack
Sign in Get early access

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 2025
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 26
  1. 3.0.0 30 Jan 2025
    Release notes
    • BREAKING:: Change the signature of the webSocketHandler method's
      onConnection callback. Previously this took an untyped function with either
      one or two parameters. This now requires a ConnectionCallback; 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');
      });
    });
    Open source →
    Release notes
    • BREAKING:: Change the signature of the webSocketHandler method's onConnection callback. Previously this took an untyped function with either one or two parameters. This now requires a ConnectionCallback; 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');
      });
    });
    
    Open source →
  2. 2.0.1 22 Nov 2024
    Release notes
    • Require Dart ^3.3.0.
    Open source →
    Release notes
    • Require Dart ^3.3.0.
    Open source →
  3. 2.0.0 06 May 2024
    Release notes
    • BREAKING:: Remove support for hijacking WebSocket requests that are not being transported using dart:io Sockets.
    • Require Dart ^3.0.0.
    Open source →
  4. 1.0.4 03 May 2023
    Release notes
    • Added package topics to the pubspec file.
    Open source →
  5. 1.0.3 03 Nov 2022
    Release notes
    • Require Dart 2.17.
    • Fix checking for binary callbacks with strong null safety.
    Open source →
  6. 1.0.2 16 Jun 2022
    Release notes
    • Require Dart 2.14.
    • Update the pubspec repository field.
    Open source →
  7. 1.0.1 17 Mar 2021
    Release notes
    • Require the latest shelf, remove dead code.
    Open source →
  8. 1.0.0 24 Feb 2021
    Release notes
    • Migrate to null safety.
    Open source →
  9. 0.2.4 29 Jan 2021
    Release notes
    • Support the latest shelf release (1.x.x).
    • Require at least Dart 2.1
    • Allow omitting protocols argument even if the onConnection callback takes a second argument.
    Open source →
  10. 0.2.4+1 18 Feb 2021
    Release notes
    • Support the latest package:web_socket_channel.
    Open source →
  11. 0.2.3 17 Apr 2019
    Release notes
    • Add pingInterval argument to webSocketHandler, to be passed through to the created channel.
    Open source →
  12. 0.2.2 27 Sep 2017
    Release notes
    • Stop using comment-based generic syntax.
    Open source →
  13. 0.2.2+1 15 May 2018
    Release notes
    • Update SDK version to 2.0.0-dev.17.0.
    Open source →
  14. 0.2.2+2 01 Jun 2018
    Release notes
    • Stopped using deprected HTML_ESCAPE constant name.
    Open source →
  15. 0.2.2+3 18 Jul 2018
    Release notes
    • Set max SDK version to <3.0.0, and adjust other dependencies.
    Open source →
  16. 0.2.2+4 06 Aug 2018
    Release notes
    • Fix the check for onConnection to check the number of arguments and not that the arguments are dynamic.
    Open source →
  17. 0.2.2+5 27 Mar 2019
    Release notes
    • Allow stream_channel version 2.x
    Open source →
  18. 0.2.1 11 May 2016
    Release notes
    • Fix all strong-mode warnings.
    Open source →
  19. 0.2.0 03 Mar 2016
    Release notes
    • Breaking change: webSocketHandler() now uses the WebSocketChannel class defined in the web_socket_channel package, rather than the deprecated class defined in http_parser.
    Open source →
  20. 0.1.0 01 Feb 2016
    Release notes
    • Breaking change: webSocketHandler() now passes a WebSocketChannel to the onConnection() callback, rather than a deprecated CompatibleWebSocket.
    Open source →
  21. 0.0.1 20 May 2014

    Nothing published for this version

  22. 0.0.1+1 18 Dec 2014
    Release notes
    • Properly parse the Connection header. This fixes an issue where Firefox was unable to connect.
    Open source →
  23. 0.0.1+2 05 Mar 2015
    Release notes
    • Mark as compatible with version 0.6.0 of shelf.
    Open source →
  24. 0.0.1+3 26 Aug 2015
    Release notes
    • Support http_parser 1.0.0.
    Open source →
  25. 0.0.1+4 27 Aug 2015
    Release notes
    • Fix a link to shelf in the README.
    Open source →
  26. 0.0.1+5 14 Dec 2015
    Release notes
    • Support http_parser 2.0.0.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive