wssnet_ghost3a 3.1.29

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

node-ghost3a #

Lightweight, web server, websocket server, websocket client. Cluster support. Simple and easy to use.

Install #

PM2 management process is recommended:

npm install pm2 -g

Then install this framework in your project directory:

npm install node-ghost3a

Server and client example #

  git clone
  cd node-ghost3a/example
  pm2 start ecosystem.config.js --env development

Then browse http://localhost:8080/ in your modern browser.

You can use pm2 log to see the server logs.

Client for flutter or dart #

Edit dependencies in pubspec.yaml

       wssnet_ghost3a: ^3.1.29

API usage is the same as index.html in example.

API document #

See the source code comments in src for the framework. My notes are very detailed.

3.1.29 #

  • Modify nodejs server framework.

3.1.28 #

  • Add switch for client to control automatic reconnection

3.1.27 #

  • Reduce crypto version to 2.1.3 for dart client

3.1.26 #

  • Fix bug of dart client

3.0.56 #

  • Upgrade dependency libraries

3.0.54 #

  • Add md5 method.

3.0.53 #

  • Fixed a bug for dart client.

3.0.52 #

  • Initial version.


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

void testWssClient() {
  Ghost3a net = Ghost3a('http://localhost:8082/', '123', true, heartick: 3);
  net.connect(([List<dynamic> params]) {
  }, (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), () {

void main() {

Use this package as a library

1. Depend on it

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

  wssnet_ghost3a: ^3.1.29

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:wssnet_ghost3a/wssnet_ghost3a.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jun 5, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.2
  • pana: 0.13.8-dev

Health issues and suggestions

Document public APIs. (-1 points)

71 out of 71 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/wssnet_ghost3a.dart.

Run dartfmt to format lib/wssnet_ghost3a.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
crypto ^2.1.3 2.1.5
encrypt ^4.0.0 4.0.2
Transitive dependencies
args 1.6.0
asn1lib 0.6.4
charcode 1.1.3
clock 1.0.1
collection 1.14.12
convert 2.1.1
meta 1.1.8
pointycastle 1.0.2
typed_data 1.1.6