signalr2 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 37

signalr2

Incredibly simple real-time web for ASP.NET Core 2.1 This is an interop library for the @aspnet/signalr_client package. Find more Information at https://github.com/aspnet/SignalR

Currently in sync with the release 1.0.0 from 2018-05-29.

Usage

Add a <script> tag to your index.html and point it to the current SignalR JavaScript file distributed with the current release of this library:

<script src="packages/signalr2/dist/signalr.min.js"></script>

A simple usage example:

import 'dart:async';
import 'dart:js';
import 'package:signalr2/signalr2.dart' as signalr;

Future<Null> main() async {
  var connection = new signalr.HubConnectionBuilder()
      .withUrl('/chat')
      .configureLogging(signalr.LogLevel.Information)
      .build();

  connection.on('send', allowInterop((data) {
    print(data);
  }));

  await connection.start();

  new Timer.periodic(const Duration(seconds: 1), (r) {
    connection.send('send', 'Hi');
  });
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

1.0.0

  • Catching up with the current release

1.0.0-preview2-final

  • Catching up with the current release

1.0.0-alpha1-final

Use this package as a library

1. Depend on it

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


dependencies:
  signalr2: ^1.0.0

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:signalr2/signalr2.dart';
  
Version Uploaded Documentation Archive
1.0.0 May 31, 2018 Go to the documentation of signalr2 1.0.0 Download signalr2 1.0.0 archive
1.0.0-preview2-final Apr 27, 2018 Go to the documentation of signalr2 1.0.0-preview2-final Download signalr2 1.0.0-preview2-final archive
1.0.0-alpha1-final Sep 15, 2017 Go to the documentation of signalr2 1.0.0-alpha1-final Download signalr2 1.0.0-alpha1-final archive
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
37
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.0.0.
 
 Because signalr2 depends on func >=0.1.1 which requires SDK version >=1.9.0 <2.0.0, version solving failed.

Health suggestions

Format lib/src/IHubProtocol.dart.

Run dartfmt to format lib/src/IHubProtocol.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

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.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use signalr2.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0