1.0.5 • Published 5 years ago

node-cmpp-2 v1.0.5

Weekly downloads
4
License
ISC
Repository
-
Last release
5 years ago

node-cmpp-2.0

Install:

npm install node-cmpp-2

This is an implementation for CMPP 2.0 protocol.

Now the project passed basic test. But it is not fully tested.

This project is write in Typescript 1.4.

File index.ts is example code. File client.ts is the entry.

Api:

   var Client = require("node-cmpp-2");
   var client = new Client({
    heartbeatInterval: 3 * 60 * 1000, //default
  	heartbeatTimeout: 60 * 1000, //default
  	heartbeatMaxAttempts: 3, //default
  	timeout:30*1000, //default
  	port:7890, //default
  	host:"127.0.0.1", //default
  	serviceId:"serviceName", //default
  	feeCode:"100", //default
  	srcId:"10xxxxxx", //default
    mobilesPerSecond:200 //default
   });
   
   client.connect("spid","secret").then(()=>{
    client.sendGroup(["136xxxxxx","137xxxxx"],"这是一条测试群发短信").catch((err)=>{
        console.log(err);
    });
  });

origin Author: flyingfisher ( https://npm.taobao.org/package/node-cmpp-3 )

fixed cmpp-2.0 version: karma54617

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago