#STOMP Dart Client
STOMP Dart client for communicating with STOMP complaint messaging brokers and servers.
Stomp Dart Client is distributed under an Apache 2.0 License.
##Installation
Add this to your pubspec.yaml
(or create it):
dependencies:
stomp:
Then run the Pub Package Manager (comes with the Dart SDK):
pub install
##Usage
###Running on Dart VM
import "package:stomp/stomp.dart";
import "package:stomp/vm.dart" show connect;
void main() {
connect("foo.server.com").then((StompClient client) {
client.subscribeString("/foo",
(Map<String, String> headers, String message) {
print("Recieve $message");
});
client.sendString("/foo", "Hi, Stomp");
});
}
There are basically a few alternative ways to communicate:
sendJson()
and subscribeJson()
sendString()
and subscribeString()
sendBytes()
and subscribeBytes()
sendBlob()
and subscribeBlob()
Please refer to StompClient for more information.
###Running on Browser
The same as the above, except import websocket.dart
instead of vm.dart
:
import "package:stomp/stomp.dart";
import "package:stomp/websocket.dart" show connect;
//the rest is the same as running on Dart VM
##Limitations
##Incompleteness
Add this to your package's pubspec.yaml file:
dependencies:
stomp: ^0.5.4
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support pub get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:stomp/stomp.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.8.0 | Nov 5, 2018 |
|
|
0.7.3 | Oct 31, 2014 |
|
|
0.7.2 | Apr 2, 2014 |
|
|
0.7.1 | Feb 14, 2014 |
|
|
0.7.0 | Jan 29, 2014 |
|
|
0.6.0+1 | Jan 10, 2014 |
|
|
0.6.0 | Dec 21, 2013 |
|
|
0.5.5 | Nov 11, 2013 |
|
|
0.5.4 | Nov 5, 2013 |
|
|
0.5.3 | Oct 29, 2013 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
76
|
Health:
Code health derived from static analysis.
[more]
|
--
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
--
|
Overall:
Weighted score of the above.
[more]
|
38
|
This package version is not analyzed, because it is more than two years old. Check the latest stable version for its analysis.
Running dartdoc
failed. (-10 points)
Make sure dartdoc
runs without any issues.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=0.8.7 |