-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'dart:async'; | ||
import 'dart:io' as io show exit; | ||
|
||
import 'package:centrifuge_dart/centrifuge.dart'; | ||
|
||
void main([List<String>? args]) { | ||
final client = Centrifuge( | ||
CentrifugeConfig( | ||
client: ( | ||
name: 'Centrifuge Console Example', | ||
version: '0.0.1', | ||
), | ||
), | ||
)..connect('ws://localhost:8000/connection/websocket?format=protobuf'); | ||
|
||
// TODO(plugfox): Read from stdin and send to channel. | ||
|
||
Timer( | ||
const Duration(seconds: 1), | ||
() async { | ||
await client.close(); | ||
await Future<void>.delayed(const Duration(seconds: 1)); | ||
io.exit(0); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: centrifuge_dart_example_console | ||
|
||
description: > | ||
Dart client to communicate with Centrifuge and Centrifugo from Flutter and VM | ||
over WebSockets | ||
version: 0.0.1-pre.1 | ||
|
||
publish_to: 'none' | ||
|
||
homepage: https://centrifugal.dev | ||
|
||
repository: https://github.com/PlugFox/centrifuge-client | ||
|
||
issue_tracker: https://github.com/PlugFox/centrifuge-client/issues | ||
|
||
funding: | ||
- https://www.buymeacoffee.com/plugfox | ||
- https://www.patreon.com/plugfox | ||
- https://boosty.to/plugfox | ||
|
||
topics: | ||
- centrifugo | ||
- centrifuge | ||
- websocket | ||
- cross-platform | ||
- client | ||
|
||
platforms: | ||
android: | ||
ios: | ||
linux: | ||
macos: | ||
web: | ||
windows: | ||
|
||
#screenshots: | ||
# - description: 'Example of using the ws library to connect to a Centrifugo server.' | ||
# path: example.png | ||
|
||
environment: | ||
sdk: '>=3.0.0 <4.0.0' | ||
|
||
dependencies: | ||
centrifuge_dart: | ||
path: ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters