Skip to content
pubscout

connectanum

2.2.7, released 9 months ago by dart.konsultaner.de

A Dart/Flutter client implementing the WAMP protocol for RPC and Pub/Sub.

WASM-ready
$ flutter pub add connectanum
Source repository

What it does

Provides transport-agnostic communication over WebSocket, RawSocket, or local transports using WAMP. Supports authentication methods, advanced RPC and Pub/Sub features, and multiple serialization formats.

AI-written summary of version 2.2.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need real‑time RPC or Pub/Sub with a WAMP router
  • Cross‑platform support including web, mobile, and desktop
  • Custom authentication (CRA, SCRAM, Ticket, Cryptosign) is required

Skip it when

  • A simple REST/GraphQL API would suffice
  • You need built‑in UI components or notifications
  • You prefer a higher‑level backend‑as‑a‑service SDK

Strengths

  • Comprehensive WAMP feature support
  • Multiple authentication methods
  • Works on all major Flutter platforms
  • Stream‑based API fits reactive code

Weaknesses

  • Not a drop‑in replacement for HTTP clients
  • Requires a WAMP router backend
  • Limited documentation beyond README

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
8

Add the package, choose a transport (e.g., WebSocketTransport), and call client.connect(); no special permissions needed.

import 'package:connectanum/connectanum.dart';
import 'package:connectanum/json.dart';

final client = Client(
  realm: "my.realm",
  transport: WebSocketTransport(
    "ws://localhost:8080/wamp",
    Serializer(),
    WebSocketSerialization.serializationJson,
  ),
);
final session = await client.connect().first;

Alternatives

Packages that do the same job and could replace connectanum.

  • http2

    An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.

  • dart_nats

    A Dart and Flutter client library for the NATS messaging system.

  • mcp_client

    Dart client implementation for the Model Context Protocol (MCP) supporting all revisions and transports.

  • didcomm

    Implements the DIDComm v2 Messaging protocol for secure and private app communication.

Works with

Packages commonly used together with connectanum: ones it builds on, ones built on it, and its own family.