(Android_x86_64)
javascript
|
cocos2d-js
|
js-bindings (XMLHttpRequest、 WebSocket、 SocketIO)
|
cocos2dx
|
cocos2dx::network (HttpClient、 WebSocket、 SocketIO)
|
Java Native Interface (JNI)
|
Adnroid (Dalvik)
There is usually three methods to send request: XMLHttpRequest, WebSocket, SocketIO
XMLHttpRequest <- cocos2dx::network::HttpClient <- javax.net.ssl.HttpsURLConnection(JNI) / libcurl(Other)
<- cocos2dx::network::HttpRequest
<- cocos2dx::network::HttpResponse
WebSocket <- cocos2dx::network::Websocket <- libwebsocket
SocketIO <- cocos2dx::network::Websocket <- libwebsocket
Ambiguous memory layout defines in cocos2djs.h