
git-subtree-dir: packages/sync git-subtree-mainline:bda70d18e3
git-subtree-split:f5129b6882
21 lines
No EOL
772 B
Markdown
21 lines
No EOL
772 B
Markdown
# sync
|
|
[](https://pub.dartlang.org/packages/angel_sync)
|
|
[](https://travis-ci.org/angel-dart/sync)
|
|
|
|
Easily synchronize and scale WebSockets using package:pub_sub.
|
|
|
|
# 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 Angel!
|
|
|
|
```dart
|
|
await app.configure(new AngelWebSocket(
|
|
synchronizationChannel: new PubSubSynchronizationChannel(
|
|
new pub_sub.IsolateClient('<client-id>', adapter.receivePort.sendPort),
|
|
),
|
|
));
|
|
``` |