Coder Social home page Coder Social logo

go_cmpp's Introduction

go_cmpp

Build Status Go Report Card codecov

go_cmpp是为SP设计实现的CMPP2.0协议开发工具包。包括cmpp协议包和命令行工具。

安装

go get github.com/yedamao/go_cmpp/...
cd $GOPATH/src/github.com/yedamao/go_cmpp && make

Cmpp协议包

支持操作

  • CMPP_CONNECT
  • CMPP_TERMINATE
  • CMPP_TERMINATE_RESP
  • CMPP_SUBMIT
  • CMPP_QUERY
  • CMPP_DELIVER_RESP
  • CMPP_CANCEL
  • CMPP_ACTIVE_TEST
  • CMPP_ACTIVE_TEST_RESP

Example

参照cmd/transmitter/main.go, cmd/receiver/main.go

命令行工具

mockserver

ISMG短信网关模拟器

Usage of ./bin/mockserver:
  -activeTest
        是否activeTest
  -addr string
        addr(本地监听地址) (default ":7890")
  -mo
        是否模拟上行短信
  -rpt
        是否模拟上行状态报告

transmitter

提交单条短信至短信网关

Usage of ./bin/transmitter:
  -addr string
        smgw addr(运营商地址) (default ":7890")
  -dest-number string
        接收手机号码, 86..., 多个使用,分割
  -msg string
        短信内容
  -secret string
        登陆密码
  -serviceId string
        业务类型,是数字、字母和符号的组合
  -sourceAddr string
        源地址,即SP的企业代码
  -srcId string
        SP的接入号码

receiver

接收运营商回执状态/上行短信

Usage of ./bin/receiver:
  -addr string
        smgw addr(运营商地址) (default ":7890")
  -secret string
        登陆密码
  -sourceAddr string
        源地址,即SP的企业代码

go_cmpp's People

Contributors

yedamao avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.