How to use Pomleo client in Cocos2d jsb?
you can use pomelo-jsclient-websocket
I use pomelo-jsclient-websocket in jsb prompted wrong, is not defined window. I pre-var windows = {}, and tips Protocol does not exist. I use pomelo-jsclient-scoet.io in jsb prompted pomelo-client.js: 84: ReferenceError: EventEmitter is not defined, but also dependences the code in the node.js
cocos2d jsb no node.js environment, if you want to use in cocos2d jsb Pomleo Clinet need to c language version of the api to bind to js on?
pomelo-jsclient-websocket is pure javascript client, no need node.js environment
pomelo-jsclient-websocket need Browser environment?
var Protocol = window.Protocol; var Package = Protocol.Package; var Message = Protocol.Message; var EventEmitter = window.EventEmitter; ///---------------------------- In cocos2d jsb environments Protocol, EventEmitter are not defined!
window is the global object in javascript
Only in Cocos2d jsb js to cocos2d-x binding and js built-in data types, no other things. js virtual machine using SpiderMonkey (SpiderMonkey is Mozilla's JavaScript engine written in C / C + +. It is used in various Mozilla products, including Firefox, and is available under the MPL2.)
Hi. How to use Pomleo client in Window phone? Thanhks.