- Add VariableSpec class with magnitude field validation - Add Formula class supporting multiple input/output variables - Support d4rt_code as string or object with code field - Add comprehensive tests for parsing and serialization - Fix broken test import in pruebas_d4rt_test.dart Follows README.md format requirements exactly |
||
|---|---|---|
| .. | ||
| example | ||
| lib | ||
| test | ||
| analysis_options.yaml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| mono_pkg.yaml | ||
| pubspec.yaml | ||
| README.md | ||
Web Socket Handler for Shelf
shelf_web_socket is a Shelf handler for establishing WebSocket
connections. It exposes a single function, webSocketHandler, which calls an
onConnection callback with a WebSocketChannel object for every
connection that's established.
import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:shelf_web_socket/shelf_web_socket.dart';
void main() {
var handler = webSocketHandler((webSocket, _) {
webSocket.stream.listen((message) {
webSocket.sink.add('echo $message');
});
});
shelf_io.serve(handler, 'localhost', 8080).then((server) {
print('Serving at ws://${server.address.host}:${server.port}');
});
}