Giter Club home page Giter Club logo

sms-china's Introduction

SMS-China

**移动CMPP、联通SGIP、电信SMGP三网合一企业短信网关

http://222.66.24.235:8080/ctmp/file/api.zip

java sample code:

public class SMGPTester {
    private static Logger log = LogManager.getLogger(SMGPTester.class);
    private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");

    public static void main(String[] args) {
        SMGPConnection conn = new SMGPConnection();
        conn.setClientId("aaa021");
        conn.setPassword("aaa123");
        conn.setVersion((byte) 0);
        conn.setAutoReconnect(true);
        conn.setSendInterval(200);

        conn.connect("222.66.24.235", 8900);
        //conn.connect("127.0.0.1", 8900);

        if(conn.isConnected()){

            Session session = conn.getSession();

            String[] phones = new String[] { "1316264XXXX" };

            long startTime = System.currentTimeMillis();
            try {
                for(int i = 0; i < 1; i++) {
                    String content = String.format("第%d条:电信smgp测试Z(%s)", i+1, format.format(new Date()));
                    session.submit(content, "1065902100612", phones[i/10]);
                }
            }
            finally {
                log.info(String.format("total:%d",System.currentTimeMillis()-startTime));
                /*
                try {
                    Thread.sleep(10000L);
                }
                catch (InterruptedException ex) {}
                try {
                    session.close();
                }
                catch (IOException ex){
                }
                */
            }
        }
    }
}

sms-china's People

Contributors

clonalman avatar

Watchers

 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.