Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 759 Bytes

readme.md

File metadata and controls

37 lines (29 loc) · 759 Bytes

libcocos2djs.so

(Android_x86_64)

Architecture

javascript
	|
cocos2d-js
	|
js-bindings (XMLHttpRequest、 WebSocket、 SocketIO)
	|
cocos2dx
	|
cocos2dx::network (HttpClient、 WebSocket、 SocketIO)  
	|
Java Native Interface (JNI)
	|
Adnroid (Dalvik)

Class Implement

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

Class Memory Layout

Ambiguous memory layout defines in cocos2djs.h