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.^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');
});
});
^3.3.0.dart:io Sockets.^3.0.0.2.17.2.14.repository field.package:web_socket_channel.1.x.x).protocols argument even if the onConnection callback takes a second argument.pingInterval argument to webSocketHandler, to be passed through to the created channel.stream_channel version 2.xonConnection to check the number of arguments and not that the arguments are dynamic.<3.0.0, and adjust other dependencies.HTML_ESCAPE constant name.webSocketHandler() now uses the WebSocketChannel class defined in the web_socket_channel package, rather than the deprecated class defined in http_parser.webSocketHandler() now passes a WebSocketChannel to the onConnection() callback, rather than a deprecated CompatibleWebSocket.http_parser 2.0.0.shelf in the README.http_parser 1.0.0.0.6.0 of shelf.Connection header. This fixes an issue where Firefox was unable to connect.