stomp 0.7.3

  • README.md
  • Installing
  • Versions
  • 29

#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.

Build Status

See also Ripple - Lightweight Dart Messaging Server.

##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:

  • JSON objects: sendJson() and subscribeJson()
  • Strings: sendString() and subscribeString()
  • Bytes: sendBytes() and subscribeBytes()
  • BLOB (huge data): 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

  • Support STOMP 1.2 or above
  • Support UTF-8 encoding

##Incompleteness

  • Heart beat not supported.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stomp: ^0.7.3

2. Install it

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.

3. Import it

Now in your Dart code, you can use:


import 'package:stomp/stomp.dart';
  
Version Uploaded Documentation Archive
0.7.3 Oct 31, 2014 Go to the documentation of stomp 0.7.3 Download stomp 0.7.3 archive
0.7.2 Apr 2, 2014 Go to the documentation of stomp 0.7.2 Download stomp 0.7.2 archive
0.7.1 Feb 14, 2014 Go to the documentation of stomp 0.7.1 Download stomp 0.7.1 archive
0.7.0 Jan 29, 2014 Go to the documentation of stomp 0.7.0 Download stomp 0.7.0 archive
0.6.0+1 Jan 10, 2014 Go to the documentation of stomp 0.6.0+1 Download stomp 0.6.0+1 archive
0.6.0 Dec 21, 2013 Go to the documentation of stomp 0.6.0 Download stomp 0.6.0 archive
0.5.5 Nov 11, 2013 Go to the documentation of stomp 0.5.5 Download stomp 0.5.5 archive
0.5.4 Nov 5, 2013 Go to the documentation of stomp 0.5.4 Download stomp 0.5.4 archive
0.5.3 Oct 29, 2013 Go to the documentation of stomp 0.5.3 Download stomp 0.5.3 archive
0.5.2+1 Aug 27, 2013 Go to the documentation of stomp 0.5.2+1 Download stomp 0.5.2+1 archive

All 13 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
56
Health:
Code health derived from static analysis. [more]
4
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
29
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: unsure

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/impl/util_read.dart. (-82.20 points)

Analysis of lib/src/impl/util_read.dart failed with 6 errors, including:

line 24 col 46: Undefined name 'UTF8'.

line 28 col 46: Undefined name 'UTF8'.

line 90 col 26: Undefined name 'UTF8'.

line 164 col 15: Undefined name 'UTF8'.

line 169 col 20: Undefined name 'UTF8'.

Fix lib/impl/plugin.dart. (-44.31 points)

Analysis of lib/impl/plugin.dart failed with 2 errors, 2 hints:

line 129 col 14: Undefined name 'UTF8'.

line 160 col 14: Undefined name 'UTF8'.

line 7 col 8: Unused import: 'dart:convert'.

line 7 col 28: The library 'dart:convert' doesn't export a member with the shown name 'UTF8'.

Fix lib/src/impl/util_write.dart. (-25 points)

Analysis of lib/src/impl/util_write.dart failed with 1 error:

line 65 col 15: Undefined name 'UTF8'.

Fix additional 7 files with analysis or formatting issues. (-55.47 points)

Additional issues in the following files:

  • lib/src/stomp_impl.dart (1 error)
  • lib/src/stomp_util.dart (1 error)
  • lib/stomp.dart (4 hints)
  • lib/websocket.dart (4 hints)
  • lib/impl/util.dart (3 hints)
  • lib/impl/plugin_vm.dart (Run dartfmt to format lib/impl/plugin_vm.dart.)
  • lib/vm.dart (Run dartfmt to format lib/vm.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: quiver.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use stomp.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0
quiver any 2.0.0+1
Transitive dependencies
matcher 0.12.4
meta 1.1.6
path 1.6.2
stack_trace 1.9.3
Dev dependencies
unittest any