wamp_client 0.1.1

  • README.md
  • Example
  • Installing
  • Versions
  • 66


A library for Dart WAMP client.


A simple usage example:

import 'package:wamp_client/wamp_client.dart';

main() async {
  var wamp = new WampClient('your.realm1')
    ..onConnect = (c) {
      c.subscribe('your.topic').then((sub) async {
        await for (var event in sub) {

  await wamp.connect('ws://localhost:8080/ws');

Features and bugs

Please file feature requests and bugs at the issue tracker.



  • Add unregister method.
  • Add prefix wildcard match option.


  • Initial version, created by Stagehand


import 'dart:async';
import 'package:wamp_client/wamp_client.dart';

Future main() async {
  var wamp = new WampClient('realm1')
    ..onConnect = (c) {
      c.subscribe('topic').then((s) async {
        await for (final ev in s) {
          print('ev $ev');
      print('start sub');

      c.publish('topic').then((dynamic _) {

      final pname = 'proc.17';

      c.register(pname, (a) {
        print('proc arg: $a');
        throw new WampArgs(<dynamic>[100], <String, dynamic>{'test': true});
        return a;
      }).then((WampRegistration regid) async {
        print('register ok $regid');
        await c.unregister(regid);
        print('unregister ok');
      }).catchError((dynamic e) {
        print('register error $e');

      c.call(pname, <dynamic>[2, 3], <String, dynamic>{'hello': 'world!'}).then(
          (r) {
        print('result ${r.args} ${r.params}');
      }).catchError((dynamic e) {
        print('err $e');
  await wamp.connect('ws://localhost:8080/ws');

Use this package as a library

1. Depend on it

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

  wamp_client: "^0.1.1"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:wamp_client/wamp_client.dart';
Version Uploaded Documentation Archive
0.1.1 Jun 13, 2017 Go to the documentation of wamp_client 0.1.1 Download wamp_client 0.1.1 archive
0.0.1 Jun 11, 2017 Go to the documentation of wamp_client 0.0.1 Download wamp_client 0.0.1 archive


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

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
34 / 100
Code health derived from static analysis. [more]
95 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:wamp_client/wamp_client.dart with components: io.


  • The description is too short.

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

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 19 hints.

    Strong-mode analysis of lib/src/wamp_client_base.dart gave the following hint:

    line: 59 col: 12
    'JSON' is deprecated and shouldn't be used.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
Dev dependencies
test ^0.12.0