2014-12-31 16:28:14 +08:00
|
|
|
if nil == cc.XMLHttpRequest then
|
|
|
|
return
|
|
|
|
end
|
2014-08-04 15:22:07 +08:00
|
|
|
|
|
|
|
cc.WEBSOCKET_OPEN = 0
|
|
|
|
cc.WEBSOCKET_MESSAGE = 1
|
|
|
|
cc.WEBSOCKET_CLOSE = 2
|
|
|
|
cc.WEBSOCKET_ERROR = 3
|
|
|
|
|
|
|
|
cc.WEBSOCKET_STATE_CONNECTING = 0
|
|
|
|
cc.WEBSOCKET_STATE_OPEN = 1
|
|
|
|
cc.WEBSOCKET_STATE_CLOSING = 2
|
|
|
|
cc.WEBSOCKET_STATE_CLOSED = 3
|
|
|
|
|
2014-10-11 01:27:12 +08:00
|
|
|
cc.XMLHTTPREQUEST_RESPONSE_STRING = 0
|
2014-08-04 15:22:07 +08:00
|
|
|
cc.XMLHTTPREQUEST_RESPONSE_ARRAY_BUFFER = 1
|
2014-10-11 01:27:12 +08:00
|
|
|
cc.XMLHTTPREQUEST_RESPONSE_BLOB = 2
|
|
|
|
cc.XMLHTTPREQUEST_RESPONSE_DOCUMENT = 3
|
|
|
|
cc.XMLHTTPREQUEST_RESPONSE_JSON = 4
|