A platform-independent WebSocket library using the Dart async API.

This library defines a WebSocket interface very much like the one in dart:io that can be used when writing platform-independent packages like API-wrappers.

The documentation for this library can be found on DartDocs.

Creating and using WebSockets with this library is easy, it works entirely the same as how the dart:io.WebSocket class works:

import "dart:io"; import "package:websockets/websockets.dart"; main() async { WebSocket ws = await WebSocket.connect("wss://echo.websocket.org"); ws.listen(print); ws.add("test"); }

When developing platform-independent packages #