pandamicro
ea6a6a8586
Reverse include path in network module and update web engine
2016-05-25 23:58:11 +08:00
pandamicro
8692ee176c
Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3
...
Conflicts:
cocos/network/HttpAsynConnection-apple.m
cocos/network/HttpClient-android.cpp
cocos/network/HttpClient.cpp
cocos/network/HttpCookie.h
cocos/network/HttpRequest.h
cocos/network/HttpResponse.h
cocos/network/SocketIO.cpp
cocos/network/WebSocket.h
2016-05-25 19:19:27 +08:00
minggo
4e92b82571
Merge pull request #15716 from cezheng/bug/ios_httpclient_ssl
...
correct assign to equal in cert trust expression
2016-05-25 18:44:01 +08:00
Ce Zheng
e4bf6584db
correct assign to equal in cert trust expression
2016-05-25 18:34:05 +09:00
James Chen
1db3c1644d
dlfree fix for HttpClient, the instances of Ref or its sub classes should be released by CC_SAFE_RELEASE rather than CC_SAFE_DELETE.
2016-05-25 13:54:13 +08:00
pandamicro
a03c45ce62
Update network licenses and reformat
2016-05-18 14:29:54 +08:00
mogemimi
948f64631f
Use const references whenever possible
2016-05-17 13:17:56 +09:00
mogemimi
a1a8feed71
Add missing references to avoid unnecessary copies
2016-05-17 01:15:07 +09:00
mogemimi
16878a53b1
Suppress MSVC warning C4800
2016-05-13 11:44:17 +09:00
minggo
74af3b5232
merge v3.11 back to v3
2016-05-12 09:50:03 +08:00
pandamicro
85812b4f5b
Remove client_no_context_takeover extension in WebSocket (not working on Android/iOS/Mac)
2016-05-10 20:35:02 +08:00
minggo
fd160a1611
remove Content-Type limitation
2016-05-10 18:15:57 +08:00
mogemimi
2df9afbe71
Fix typos in documentation and comments
2016-05-05 08:05:20 +09:00
pandamicro
fcfaafa4a5
Fix SocketIO fail to connect issue on Android
2016-05-04 17:43:36 +08:00
minggo
a5602cc732
merge v3.11 back to v3
2016-05-04 16:02:23 +08:00
mogemimi
a3ad4cddf8
Fix warnings about signed/unsigned mismatch
2016-04-22 12:20:05 +09:00
minggo
949112fdc2
Merge pull request #14321 from pandemosth/socketIO_issue_14287
...
Fix SocketIO crash on reconnect
2016-04-21 14:28:21 +08:00
Ce Zheng
200c9fda59
fix HTTPAsyncConnection bad memory management
...
Removed a redundant release on certDataRef that caused crash on
NSURLConnectionLoader thread.
Fixed a memory leak of SecCertificateRef
This fixes #15464
2016-04-20 14:04:44 +09:00
Ce Zheng
7f1b02ab92
Merge branch 'fix/ios_downloader_crashes_with_storage_path_containing_spaces' into fix/several_network_bugs
2016-04-20 12:12:31 +09:00
minggo
776ee8ac5a
Merge pull request #14843 from cezheng/fix/ios_downloader_crashes_with_storage_path_containing_spaces
...
fix iOS downloader crash when storage path contains spaces
2016-04-19 13:46:02 +08:00
minggo
03ad0f01c9
Merge pull request #15001 from mogemimi/refactor-httprequest
...
Refactor HttpRequest and HttpResponse
2016-04-19 11:23:59 +08:00
mogemimi
d1871d1ca7
Refactor HttpRequest and HttpResponse
2016-04-19 02:58:42 +09:00
Xpol Wan
dc0f7bf903
Fixes format warnings.
2016-04-18 17:52:58 +08:00
James Chen
6dff5fdc13
std::shared_ptr<bool> -> std::shared_ptr<std::atomic<bool>>
...
The reference count field in shared_ptr is threadsafe but the value field is not. So we need to wrap a std::atomic for preventing potential thread racing.
2016-04-07 15:06:19 +08:00
minggo
6b167a1aa1
Merge pull request #15335 from mogemimi/fix-typos
...
Fix typos in comments and strings
2016-04-06 11:32:46 +08:00
pandamicro
3d7d5de95d
Merge pull request #15317 from pandamicro/v3
...
Fix Socket IO handshake issue with latest version libwebsocket
2016-04-01 22:27:57 +08:00
pandamicro
d93fbea0f6
Fix Socket IO connection issue on iOS
2016-03-31 21:21:20 +08:00
mogemimi
44080a04d8
Fix typos in comments and strings
2016-03-29 10:52:17 +09:00
pandamicro
7e87b8b389
Fix Socket IO handshake issue with latest version libwebsocket
2016-03-25 17:13:28 +08:00
Xpol Wan
32e408487f
Fixes import path for m and mm files.
2016-03-21 20:12:58 +08:00
Xpol Wan
931d56bc10
Fixes includes in .m and .mm files.
2016-03-21 11:02:00 +08:00
Xpol Wan
90456d29ba
Fixes 1605 include path in 541 files
...
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
Ricardo Quesada
9477bfd801
Merge pull request #15135 from dumganhar/ws-close-fix
...
Closes websocket connection by dispatching a 'resetDirector' event.
2016-03-10 17:39:47 -08:00
mogemimi
3a87ee46c6
Fix compiler warning: "/* within block comment"
2016-03-03 10:44:51 +09:00
Ricardo Quesada
028f8c28e1
Squashed commit of the following:
...
commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 15:19:48 2016 -0800
uses new naming convention for projects
uses _ instead of -
commit f97ba56608d48b17909649c8617ba9047b566196
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 14:49:22 2016 -0800
fooling cmake for real
commit 20c2560f75eab952e5131b484284bf20cb07fe07
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 14:43:05 2016 -0800
fooling cmake
commit a0ada44bc82941830f6c71219a1492d28c28c306
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 14:26:59 2016 -0800
makes CMake for Mac happy
commit 656b4f5e2dd741215a4699db979fe1b0dce60298
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 13:50:15 2016 -0800
linux fix
commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Mar 2 11:18:18 2016 -0800
links correctly!
commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Mar 1 17:44:58 2016 -0800
Squashed commit of the following:
commit 2ef52723dae44204c047cb177d5a5670fb659c79
Merge: 8a5c998 25cf1f1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Mar 1 16:54:04 2016 -0800
Merge branch 'v3' into cmake_android
commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24
Author: Chaoren Lin <chaorenl@google.com>
Date: Thu Feb 11 18:34:46 2016 -0800
Fix module name in Android template to match CMake project.
commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576
Author: Chaoren Lin <chaorenl@google.com>
Date: Thu Feb 11 18:27:45 2016 -0800
Add missing platform specific source file to CMake project.
commit 705389ac6582107a381d0cbc56268eaa98ffc5c3
Author: Chaoren Lin <chaorenl@google.com>
Date: Wed Feb 10 19:21:12 2016 -0800
Find AndroidNdkModules.cmake relative to android.toolchain.cmake.
commit a10075e2cb30af2e1f9a30da99efac880658ad6b
Author: Chaoren Lin <chaorenl@google.com>
Date: Wed Feb 10 19:03:11 2016 -0800
Remove cpp-empty-test from project templates.
commit e070fcbf210b8628f75785e738202a80a95ac0ff
Author: WenhaiLin <wenhai.lin@chukong-inc.com>
Date: Mon Aug 31 09:56:03 2015 +0800
Fix CMake for Android Target
2016-03-02 16:51:54 -08:00
James Chen
037051d9c4
Closes websocket connection by dispatching a 'resetDirector' event.
2016-02-29 18:55:51 +08:00
James Chen
7d43e35741
Merge branch 'v3' of git://github.com/cocos2d/cocos2d-x into refactor-websocket
2016-02-17 14:56:32 +08:00
mogemimi
44d2a161dc
Remove unnecessary c_str() calls
2016-02-04 11:52:14 +09:00
mogemimi
7dd7dfede7
Replace char* with std::string in HttpRequest
2016-01-26 05:13:18 +09:00
James Chen
28a3f78c65
Adds missing <mutex>, <memory> include files in WebSocket.h
2016-01-22 18:10:24 +08:00
James Chen
b73b16d425
Adds isDestroy std::share_ptr variable to dectect whether websocket instance was destroyed.
2016-01-22 17:43:30 +08:00
James Chen
c3e0edde06
'closed' state has to be set before quit websocket thread.
2016-01-22 16:10:49 +08:00
James Chen
a64a789308
_readyState must be set to State::CLOSED and _delegate->onClose(this) must be invoked at the end of WebSocket::close.
2016-01-22 15:20:43 +08:00
James Chen
ed9ed6c92f
Don't change the behavior of WebSocket::close method. WebSocket::close is an synchronous method before, adds a WebSocket::closeAsync method for asynchronous closing.
2016-01-22 14:22:33 +08:00
James Chen
f0066d03d7
whitespace cleanup.
2016-01-13 21:15:48 +08:00
James Chen
dacd51c839
More function name renames. createThread -> createWebSocket, quitSubThread -> quitWebSocketThread.
2016-01-13 21:15:48 +08:00
James Chen
649ed67371
Removes lws_get_internal_extensions, adds permessage-deflate extension.
2016-01-13 21:15:48 +08:00
James Chen
fc38857e6b
LWS_SEND_BUFFER_PRE_PADDING -> LWS_PRE
2016-01-13 21:15:48 +08:00
James Chen
5d1e98340e
Updates WebSocket::onSocketCallback & WebSocketTest.js
2016-01-13 21:15:48 +08:00
James Chen
2b5fde79e0
Comment fix & function name fix for WsThreadHelper:
...
sendMessageToUIThread -> sendMessageToCocosThread
sendMessageToSubThread -> sendMessageToWebSocketThread
joinSubThread -> joinWebSocketThread
2016-01-13 21:15:48 +08:00
James Chen
d122784ad4
Adds WebSocket::closeAllConnections() method.
2016-01-13 21:15:48 +08:00
James Chen
f9e8ae0f09
WebSocket refactoring, bug fixes, improvements, and passes most Autobahn Test (The most standard WebSocket Protocol Test).
2016-01-13 21:14:38 +08:00
mogemimi
41dd44c75d
Fix some typos in docs
2016-01-11 19:23:05 +09:00
XiaoFeng
ab0efd933a
Merge branch 'v3.10' of https://github.com/cocos2d/cocos2d-x into v3
...
Conflicts:
CHANGELOG
cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp
tests/js-tests/src/RenderTextureTest/RenderTextureTest.js
2016-01-09 18:01:56 +08:00
Ce Zheng
963efe78fe
fix iOS downloader crash when storage path contains spaces
2016-01-07 16:58:16 +09:00
Wenhai Lin
168e851cce
Fixed WebSocket may automatically disconnected if invoke `send` several times in quick succession on Android.
2015-12-31 10:42:06 +08:00
pandamicro
022bcc24f1
Merge branch 'v3.10' of github.com:cocos2d/cocos2d-x into v3
...
Conflicts:
cocos/scripting/js-bindings/manual/chipmunk/js_bindings_chipmunk_manual.cpp
cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp
cocos/scripting/js-bindings/manual/js_bindings_opengl.cpp
2015-12-20 22:56:33 +08:00
zilongshanren
8d967982cd
Merge pull request #14723 from newnon/v3.10_web_socket_crash_fix
...
fix web socket crash
2015-12-19 10:11:58 +08:00
Sergey
b4f762befa
fix include in cocos network module
2015-12-17 11:50:54 +03:00
Sergey
a172cce874
fix web socket crash
2015-12-17 11:48:25 +03:00
pandamicro
58902f0711
Fix issue in URLSession:task:didCompleteWithError:
2015-12-16 21:19:46 +08:00
pandamicro
ffcf45ef78
Improved solution for Downloader status code issue on iOS 9
2015-12-16 17:45:40 +08:00
pandamicro
7303895866
Improve error message for Downloader and add test case
2015-12-16 15:43:18 +08:00
Wenhai Lin
4fa58602a8
Adds `std::nothrow` to the `new` statements
2015-12-16 14:02:55 +08:00
Ce Zheng
6d58fc05d9
Fix Downloader callback bug on iOS9
...
On iOS 9 when server returns a response with HTTP status 403 caused the
downloader to callback successfully and saving the error message to the
storage path. This commit adds a check on the HTTP status code and
do failure callback if status code is 4xx or 5xx.
2015-12-15 13:16:24 +09:00
pandamicro
91909081da
Merge pull request #14542 from pandemosth/issue_14539
...
Fix for Issue 14539
2015-12-03 18:47:17 +08:00
Pan Demosthenous
ef931b61af
correct typo in method name of doDestroy
2015-12-02 15:23:05 +11:00
Pan Demosthenous
528a94d36f
fixes a crash in destructor of CCDownloader-apple when completing a data download
2015-12-02 15:21:42 +11:00
Pan Demosthenous
151e7a7a53
CCDownloader-apple : call onTaskFinish when the download session completes for a data task
2015-12-02 15:16:00 +11:00
Ce Zheng
ecf94a3dc4
Add a buffer queue to iOS Downloader
...
Upon calling NSURLSessionDownloadTask's resume, the task's timeout
countdown starts. When the AssetManagerEx starts downloading, it creates
all the tasks all at once and just `resume` upon creation. When the
number of asset files is very large, later tasks tend to end up in
'request timed out -1001' error before they can even start downloading.
This commit adds a buffer queue to prevent all the NSURLSessionTasks to
start all at once.
2015-12-01 17:24:26 +09:00
Ce Zheng
d174a98afa
Add a buffer queue for Android Downloader to prevent out of memory
...
When the AssetManagerEx start downloading, it used to create all the
download tasks all at once. When the app has a large number of asset
files, it is likely to crash due to out of memory when creating
threads for each of the download tasks. This commit adds a buffer
queue to the downloader to use the `countOfMaxProcessingTasks`
property from hints, preventing all the tasks from starting all at once.
2015-12-01 16:25:50 +09:00
pandamicro
23f27534f6
Solve a possible memory leak in HttpRequest
2015-11-25 14:03:56 +08:00
Xpol Wan
0b5a3465bc
Remove duplicated code by introduce a private doSetResponseCallback.
2015-11-18 17:52:24 +08:00
Xpol Wan
b33aa00109
Fixes boring deprecated warning.
...
I know I duplicated the code but there is no cpp for me to move body into.
2015-11-18 17:47:07 +08:00
XiaoFeng
e3c120eef4
Combine Studio change for compatible with 32 bit Mac System
2015-11-16 18:25:26 +08:00
XiaoFeng
139d8b5310
Remove unused code
2015-11-06 10:10:09 +08:00
XiaoFeng
1a56668cd3
Fix "TextureCache Test" in js-test crash under Android
2015-11-06 09:49:19 +08:00
Pan Demosthenous
a4c4c64069
cleanup SIOClientImpl when an unexpected close happens
2015-11-05 13:08:33 +11:00
mogemimi
9df30d2454
Fix typos in documentation
2015-10-23 16:59:51 +09:00
XiaoFeng
6beb982665
Adjust code execute order, used a simple and safe way to avoid access fail bug.
2015-10-22 14:36:26 +08:00
XiaoFeng
7e54a91ee6
Fix CCDownloader-curl will crash in js-test
...
Fix broken image link in TextureCacheTest.js
2015-10-20 16:28:03 +08:00
mogemimi
5993304e06
Fix typos
2015-10-09 17:59:11 +09:00
ZeroHackeR
4cfe139991
Fixing SocketIO - Connect failed after Disconnected
...
Fixes for issue: https://github.com/cocos2d/cocos2d-x/issues/14077
2015-10-06 13:21:22 +06:30
Dale Stammen
548fc94eb8
added missing std includes
2015-10-02 18:17:11 -07:00
Chris Hannon
bd7f90f993
adds initializing value and corrects spelling of variable _endpointseparator
...
Signed-off-by: Chris Hannon <chris@channon.us>
2015-09-19 20:47:54 -04:00
Chris Hannon
e7c2436d85
fixes bug in socketio extension when connecting to socketio servers v1+ (incorrect separator in v1 packet strings)
...
Signed-off-by: Chris Hannon <chris@channon.us>
2015-09-19 20:31:48 -04:00
Vincent Yang
5eafc93d86
Remove AssetsManager dependence with CRUL.
2015-09-17 16:52:31 +08:00
Vincent Yang
ea585f4b7d
Fix compile problems.
2015-09-16 09:34:24 +08:00
Vincent Yang
848fa2c0d0
Merge cocos2d.
2015-09-15 18:30:45 +08:00
Vincent Yang
bf477c6bfb
Restructure AssetsManagerEx.
2015-09-15 11:23:46 +08:00
Vincent Yang
ebf308d88c
Test case Downloader Test restructured.
2015-09-14 15:33:34 +08:00
Vincent Yang
bd80eb6f46
CCDownloader-android implements Data Task Download.
2015-09-10 18:03:15 +08:00
Vincent Yang
7e2fe05050
CCDownloader-android implements File Task Download.
2015-09-10 15:56:06 +08:00
pandamicro
941cd3c9de
Merge pull request #13717 from jianglong0156/assetsmanagerContinue
...
fix the AssetsManagerEx can not continuous transmission
2015-09-10 11:34:03 +08:00
江龙
d6934cfc4b
rename var resumeDownloaded to resumeDownloaded.
2015-09-08 16:38:02 +08:00
江龙
8daf026c6c
fix the AssetsManagerEx can not continuous transmission for large zip file.
...
the testcase is extension/assetsmanager
2015-09-08 16:34:02 +08:00
minggo
bbe5861367
fix crash on xiaomi2 if cocos2d-x is built as a dynamic library
2015-09-08 10:26:37 +08:00
Vincent Yang
9b4fe5b5a1
Add CCDownloader-android class frame to android project.
2015-09-07 11:55:00 +08:00
Vincent Yang
3a078540a0
Modify CCDownloader-apple.mm support continuly download.
2015-09-07 10:08:28 +08:00
Vincent Yang
0afa2bdfc6
Modify CCDownloader-curl.cpp to support continue download.
2015-09-06 15:57:51 +08:00