# sockjs_client_wrapper 1.1.5

A Dart wrapper for the `sockjs-client` JS library.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'sockjs_client_wrapper:1.1.5'
```
Published: 2021-12-20T21:51:36.355770Z
Expected archive SHA-256: 59e284fb2481f44b8c94245151ed1815a6e476dc50cba011aff5be29969aa032

Available in cache; verification: upstream_checksum
## Direct dependencies
- js: ^0.6.1
- w_common: ^1.20.1

## Package README (untrusted upstream documentation)
# SockJS Client Wrapper

A Dart wrapper around the [SockJS Client][sockjs-client]. Uses the
[`js` Dart package][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:

```html
<!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:

```dart
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

### Install dependencies

```bash
$ npm install
$ dart pub get
```

### Run the example

```bash
$ dart run dart_dev serve
```

### Run tests

```bash
$ dart run dart_dev test
```

[js-dart-package]: https://pub.dartlang.org/packages/js
[sockjs-client]: https://github.com/sockjs/sockjs-client

## Changelog
## 1.1.4

- Dependency upgrades.

## 1.1.0

- Update SockJS library to 1.5.0 and add sourcemaps.

## 1.0.14

- Raise Dart SDK minimum to 2.4.0

## 1.06 - 1.0.13

- Internal changes and CI updates.

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







 
