Commit Graph

26 Commits

Author SHA1 Message Date
minggo f08555248f fix conflict 2022-01-24 17:23:03 +08:00
Yun Hsiao Wu 14a17c9d22 license upgrade (#4210) 2022-01-24 17:18:47 +08:00
minggo 46a455aa84 Merge v301 (#3395)
* [3.0.1] fix websocket crash (#3344)
* add lock
* use std::recursive_mutex (#3374)
2021-04-15 09:45:59 +08:00
Yun Hsiao Wu e0fdfef054 license upgrader 2021-02-05 14:08:22 +08:00
minggo 826babfa64 Format code (#3217) 2021-01-13 14:49:32 +08:00
minggo b08407c501 remove CC/cc prefix for file names (#2728) 2020-08-28 15:23:29 +08:00
minggo d381a16142 change namespace from cocos2d to cc (#2572) 2020-06-16 14:34:46 +08:00
Arnold ce1cd53386 [gfx] win32 adaptation (#2270)
* update for windows

* update ref location

* update external

* revert debug info

* fix include order

* fix template

* fix buffer

* remove CCStdC-win32*
2020-03-18 11:35:40 +08:00
minggo fb9c122827 Remove unneeded code (#2193)
* rmove unneeded codes

* fix compiling error

* remove unneeded file

* remove CCStdc related files
2020-02-26 16:11:32 +08:00
Arnold 951869f9b9 [jsb] XMLHttpRequest & WebSocket API standardize (#1557)
* xmlhttprequest statusText exclude numeric code

* websocket bufferedBytes

* websocket extensions attribute

* add websocket close arguments

* responseXML

* fix ios compile

* responseType document

* getExtensions

* rollback change for responseXML

* fix arg 1005

* use const_cast instead of create tmp value
2018-10-23 11:57:23 +08:00
minggo c4c24c9d54 windows works with new renderer (#1137) 2018-03-07 14:31:46 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen 68be4dbbaf Fix potential crash after WebSocket.close.
Since the finalize function will get a invalid pointer of WebSocket, invoking ws->closeAysnc() will generate unknown result, probably crash.
HOW TO FIX:
WebSocket and JSB_WebSocketDelegate inhert from Ref. After websocket is initialized successfully, retain websocket instance and delegate, they will both have 2 reference count.
release their reference both in onClose callback and finalize function. The reason is that the order of invoking onClose and finalize function will be unpredictable, ref count technique help to handle this.

Another fix is sending onclose event after onerror is received.
2017-07-20 16:43:24 +08:00
Nan Wang ed08907c1e fix websocket include 2017-07-06 11:07:10 +08:00
James Chen 1ba17074d1 Uses SocketRocket to implement WebSocket for iOS. It has the following benefits:
1. The API of SocketRocket is easy for use, it's all asynchronous API.
2. No need to deal with thread communications, it's wrapped inside SocketRocket.
3. Network status change will not make connection closed, it just seems there isn't any status change.
4. Locking screen will trigger an error while libwebsockets or bsd socket will not.
5. Don't depend on openssl library which is a little big.
6. Don't need to use a local CA root certificate (curl ca file is over 2MB) for wss connection
7. Don't trigger signal pipe while closing wss connection
8. Easy to integrate SocketRocket to current WebSocket implementation
2017-07-05 16:32:57 +08:00
James Chen fc98b4bdc0 Sync with cocos2d-x v3 branch ddb4dc8 commit. 2017-04-24 10:49:02 +08:00
James Chen 779cc28217 Sync from https://github.com/cocos2d/cocos2d-x/pull/17381 2017-02-20 10:46:28 +08:00
James Chen 92c0b0e5dc Updates license year. 2017-02-16 11:17:32 +08:00
James Chen 2b459eaf36 Synchronizes changes in https://github.com/cocos2d/cocos2d-x/pull/17342 2017-02-16 11:15:45 +08:00
James Chen 31326476c7 Updates WebSocket.cpp/h to support wss. 2017-02-16 11:13:31 +08:00
pandamicro bcbc4e1131 Upgrade cocos/math & cocos/network to v3.13 2016-08-05 18:13:16 +08:00
Wenhai Lin 6da52bccad Refine Websocket 2016-04-27 14:16:02 +08:00
Wenhai Lin 83fc6fd1a8 Bug fix:
1.Fixed crash in win for rich text
2.Fixed crash when custom SSL certificate is set on iOS
3.Fixed SocketIO crash on reconnect
4.Fixed ActionManager memory leak
5.Fixed crash in MenuItem::activate
6.Fixed crash on exit game
7.Fixed crash in TableView::updateCellAtIndex
8.Fixed crash in RichText on window
2016-04-21 15:19:47 +08:00
Wenhai Lin 94c95d5838 Withespaces does matter. 2016-03-31 23:50:02 +08:00
Wenhai Lin 8257556bc5 Fixed compile errors and warnings 2016-03-30 17:13:15 +08:00
Wenhai Lin a6dbf31dcf cocos 2d lite version 2016-03-29 17:55:48 +08:00