Giter VIP home page Giter VIP logo

cocoscreator-pomelo-plugin's Introduction

CocosCreator-Pomelo-plugin

Cocos Creator客户端Pomelo插件,Cocos Creator 1.5已经测试可用。 支持多连接同时存在,具体看这个PR

使用方法

将pomelo-creator-client.js文件导入Cocos Creator的工程目录中,并且在属性检查器中设置为导入为插件

非首次初始化pomelo的时候,一定要等上次的disconnect后再初始化

需要断线重连的,要记得init的时候,传入reconnect参数

示例

pomelo.init({
    host : host1,
    port : port1
}, function () {
    var route = 'gate.gateHandler.queryEntry';
    pomelo.request(route, {
    }, function () {
        pomelo.disconnect(function () {
            pomelo.init({
                host : host2,
                port : port2,
                reconnect : true
            }, function () {
            })
        });
    })
    
});

cocoscreator-pomelo-plugin's People

Contributors

kongzscott avatar zengmax 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.