Skip to content

Commit

Permalink
Merge pull request cocos2d#14867 from dumganhar/refactor-websocket
Browse files Browse the repository at this point in the history
WebSocket refactoring, bug fixes, improvements, and passes most Autobahn Test (The most standard WebSocket Protocol Test).
  • Loading branch information
ricardoquesada committed Feb 21, 2016
2 parents 7607382 + 0cb94cc commit 37db840
Show file tree
Hide file tree
Showing 9 changed files with 793 additions and 529 deletions.
3 changes: 0 additions & 3 deletions cocos/2d/win10_props/cocos2d_win10_app.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
<None Include="$(ZLibBinPath)zlib.dll">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="$(WebsocketsBinPath)libwebsockets.dll">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="$(SQLiteBinPath)sqlite3.dll">
<DeploymentContent>true</DeploymentContent>
</None>
Expand Down
3 changes: 0 additions & 3 deletions cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
<None Include="$(AngleBinPath)libGLESv2.dll">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="$(WebsocketsBinPath)libwebsockets.dll">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="$(SQLiteBinPath)sqlite3.dll">
<DeploymentContent>true</DeploymentContent>
</None>
Expand Down
4 changes: 4 additions & 0 deletions cocos/base/CCDirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ THE SOFTWARE.
#include "base/CCConfiguration.h"
#include "base/CCAsyncTaskPool.h"
#include "platform/CCApplication.h"
#include "network/WebSocket.h"

#if CC_ENABLE_SCRIPT_BINDING
#include "CCScriptSupport.h"
Expand Down Expand Up @@ -976,6 +977,9 @@ void Director::reset()
_runningScene = nullptr;
_nextScene = nullptr;

// Close all websocket connection. It has to be invoked before cleaning scheduler
network::WebSocket::closeAllConnections();

// cleanup scheduler
getScheduler()->unscheduleAll();

Expand Down
Loading

0 comments on commit 37db840

Please sign in to comment.