ws 0.0.3-dev.placeholder copy "ws: ^0.0.3-dev.placeholder" to clipboard
ws: ^0.0.3-dev.placeholder copied to clipboard

WS: A compact, highly efficient WebSocket library. Easily establish, manage, and reconnect WebSocket connections in real-time apps.

example/ws_example.dart

// ignore_for_file: avoid_print

import 'package:ws/ws.dart';

void main() async {
  const url = 'ws://localhost:1234';

  final client = WebSocketClient.connect(url);

  client.stream.listen((message) {
    print('Received message: $message');
  });

  client.add('Hello, server!');

  await Future<void>.delayed(const Duration(seconds: 10));
  client.close();
}
80
likes
0
points
1.09k
downloads

Publisher

verified publisherplugfox.dev

Weekly Downloads

WS: A compact, highly efficient WebSocket library. Easily establish, manage, and reconnect WebSocket connections in real-time apps.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on ws