wssnet_ghost3a 3.2.1 copy "wssnet_ghost3a: ^3.2.1" to clipboard
wssnet_ghost3a: ^3.2.1 copied to clipboard

discontinued

Websocket client for node-ghost3a, the server side was write by nodejs at https://github.com/yangfanyu/node-ghost3a

example/example.dart

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

void testWssClient() {
  Ghost3a net = Ghost3a('http://localhost:8082/', '123', true, heartick: 3);
  net.setLogLevel(Ghost3a.LOG_LEVEL_ALL);
  net.connect(([List<dynamic> params]) {
    print('onopen');
  }, (int code, String reason, [List<dynamic> params]) {
    print('onclose $code $reason');
  }, (String error, [List<dynamic> params]) {
    print('onerror $error');
  }, (int count, [List<dynamic> params]) {
    print('onretry $count');
  }, (int second, int delay, [List<dynamic> params]) {
    //    print('onsecond $second $delay');
  });

  Timer(Duration(seconds: 60), () {
    net.disconnect();
  });
}

void main() {
  testWssClient();
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Websocket client for node-ghost3a, the server side was write by nodejs at https://github.com/yangfanyu/node-ghost3a

Repository (GitHub)
View/report issues

License

GPL-3.0 (LICENSE)

Dependencies

crypto, encrypt

More

Packages that depend on wssnet_ghost3a