电动汽车 32960 协议服务端
import { Protocol } from "@36node/protocol-32960";
// buffer: origin data
const protocol = new Protocol({ encrypt: { key: "xx", iv: "xxx", method: "AES128" } });
const data = protocol.parse(buffer);
const buf = protocol.build(data);
Provide a simple default server, which power the 100% standard 32960 protocol.
import { server } from "@36node/protocol-32960";
server.listen(3000, () => console.log(`app started at port 3000`));
yarn global add @36node/protocol-32960
APP_PORT=3000 32960
## platform AUTH
APP_AUTH="yutong:222,wanxiang:455" APP_PORT=3000 32960
whisper is a koa style tcp server, get more from 36node/whisper
please follow the code in src/server.js
Parse a hex binary data:
$ yarn parse -h
Usage: parse [options]
Parse binary message data
Options:
-d, --data <data> Binary hex data of message
-c, --copy_to_clipboard Whether copy parsed result to clipboard
-h, --help output usage information
example:
$ yarn parse -c -d 232303fe4c53464430333230324a4330303136323701006b13020200210c81010002ff0300000423f5010002ff0300000423f3010002ff0300000423f3010002ff0300000423f3010002ff0300000423f3010002ff0300000423f6010002ff0300000423f5010002ff0300000423f5010002ff0300000423f3010002ff0300000423f30e
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
@36node/32960 © 36node, Released under the MIT License.
Authored and maintained by 36node with help from contributors (list).
github.com/zzswang · GitHub @36node