Skip to main content

angel3_sync 10.0.0 copy "angel3_sync: ^10.0.0" to clipboard
angel3_sync: ^10.0.0 copied to clipboard

Easily synchronize and scale WebSockets using belatuk_pub_sub in Angel3.

Angel3 Sync #

Pub Version (including pre-releases) Null Safety Discord License

Easily synchronize and scale WebSockets using belatuk_pub_sub.

Installation #

In your pubspec.yaml:

dependencies:
  angel3_sync: ^10.0.0

Usage #

This package exposes PubSubSynchronizationChannel, which can simply be dropped into any AngelWebSocket constructor. Once you've set that up, instances of your application will automatically fire events in-sync. That's all you have to do to scale a real-time application with Angel3!

var ws = AngelWebSocket(
  app,
  synchronizationChannel: PubSubSynchronizationChannel(
    pub_sub.IsolateClient('<client-id>', adapter.receivePort.sendPort),
  ),
);
await app.configure(ws.configureServer);
app.get('/ws', ws.handleRequest);

The channel is closed, with its pub_sub client, when the app is.

0
likes
160
points
489
downloads

Documentation

API reference

Publisher

verified publisherdukefirehawk.com

Weekly Downloads

Easily synchronize and scale WebSockets using belatuk_pub_sub in Angel3.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

angel3_websocket, belatuk_pub_sub, stream_channel

More

Packages that depend on angel3_sync