Viewing version 1.0.7. Open the latest package page.
sockjs_client_wrapper
1.0.7A Dart wrapper for the `sockjs-client` JS library.
Readme
SockJS Client Wrapper
A Dart wrapper around the SockJS Client. Uses the
js Dart package to interop with the JS lib.
Usage
Include the SockJS library in your app's index.html prior to the main Dart/JS
script:
<!DOCTYPE html>
<html>
<head> ... </head>
<body>
<!-- For local dev/debugging, use the unminified version: -->
<script src="/packages/sockjs_client_wrapper/sockjs.js"></script>
<!-- In production, use the minified version: -->
<script src="/packages/sockjs_client_wrapper/sockjs_prod.js"></script>
</body>
</html>
Import package:sockjs_client_wrapper/sockjs_client_wrapper.dart and create a
SockJSClient instance that will connect to a SockJS server:
import 'package:sockjs_client_wrapper/sockjs_client_wrapper.dart';
Future<Null> main() async {
final client = new SockJSClient(Uri.parse('ws://localhost:9000/echo'));
await client.onOpen.first;
client.send('Hello!');
...
}
Development
To install dependencies:
$ npm install
$ pub get
To run the example:
$ node example/server.js
$ pub serve example
To run tests:
$ pub run ddev test
Changelog
1.0.5
- Dart 2 compatible.
1.0.4
- Updated the SockJS library to v1.1.5 to pull in a fix for an issue where xhr_streaming loops infinitely after the connection closes.
1.0.3
- Compatible with latest Dart 2.x dev channel and Dart Dev Compiler.
1.0.2
- Logging was disabled as it was originally too verbose.
1.0.1
- Add a version check to CI.
1.0.0
- Initial release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'sockjs_client_wrapper:1.0.7'pubspec.yaml
name: sockjs_client_wrapper
version: 1.0.7
description: A Dart wrapper for the `sockjs-client` JS library.
authors:
- Workiva Client Platform Team <clientplatform@workiva.com>
- Evan Weible <evan.weible@workiva.com>
homepage: https://github.com/Workiva/sockjs_client_wrapper
environment:
sdk: '>=1.24.2 <3.0.0'
dependencies:
js: ^0.6.1
w_common: ^1.9.0
dev_dependencies:
build_runner: ">=0.6.0 <1.0.0"
build_test: ">=0.9.0 <1.0.0"
build_web_compilers: ">=0.2.0 <1.0.0"
coverage: '>=0.10.0 <0.13.0'
dart_dev: ^1.9.5
dart_style: ^1.0.8
dependency_validator: ^1.2.1
test: ^0.12.30
transformers:
- test/pub_serve:
$include: test/**_test.dart
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.0 | Cached · Upstream SHA-256 matched | Download | c70e75a9…986629 |
| 1.0.1 | Cached · Upstream SHA-256 matched | Download | 95466024…032d5a |
| 1.0.2 | Cached · Upstream SHA-256 matched | Download | 7c50fdde…6389ae |
| 1.0.3 | Cached · Upstream SHA-256 matched | Download | 152626c7…92031f |
| 1.0.4 | Cached · Upstream SHA-256 matched | Download | 99a39595…c455b5 |
| 1.0.5 | Cached · Upstream SHA-256 matched | Download | cff60f08…13a614 |
| 1.0.7 | Cached · Upstream SHA-256 matched | Download | 5e93cdb8…64e507 |
| 1.0.8 | Cached · Upstream SHA-256 matched | Download | 9363bb25…a5ec95 |
| 1.0.9 | Cached · Upstream SHA-256 matched | Download | 0e106bb5…39c176 |
| 1.0.10 | Cached · Upstream SHA-256 matched | Download | 684d9825…638b86 |
| 1.0.11 | Cached · Upstream SHA-256 matched | Download | 513cb297…e286d9 |
| 1.0.14 | Cached · Upstream SHA-256 matched | Download | 164d523b…3968ec |
| 1.1.0 | Cached · Upstream SHA-256 matched | Download | 6649993f…0b7d53 |
| 1.1.1 | Cached · Upstream SHA-256 matched | Download | b6c02919…3589eb |
| 1.1.2 | Cached · Upstream SHA-256 matched | Download | 47dc3039…289233 |
| 1.1.3 | Cached · Upstream SHA-256 matched | Download | 4972f92e…dc667c |
| 1.1.4 | Cached · Upstream SHA-256 matched | Download | 67c6ac08…fca1ab |
| 1.1.5 | Cached · Upstream SHA-256 matched | Download | 59e284fb…9aa032 |
| 1.1.8 | Cached · Upstream SHA-256 matched | Download | 5cbcb0bd…94b5e0 |
| 1.1.12 | Cached · Upstream SHA-256 matched | Download | e6e57e39…f6a543 |
| 1.2.0 | Cached · Upstream SHA-256 matched | Download | c304e85f…917054 |
| 1.3.0 | Cached · Upstream SHA-256 matched | Download | b050d453…492937 |
| 1.4.0 | Cached · Upstream SHA-256 matched | Download | 179c6d20…620e36 |
| 1.4.1 | Cached · Upstream SHA-256 matched | Download | a55be049…e94089 |
| 1.5.0 | Cached · Upstream SHA-256 matched | Download | 2202c5cf…5dd6c0 |
Dependencies
js "^0.6.1"
w_common "^1.9.0"