mirror of https://github.com/axmolengine/axmol.git
issue #2404: cocos-ext include WebSocket.h and SocketIO.h now. WebSocket.h doesn't depend on <libwebsockets.h> now.
This commit is contained in:
parent
762b987ae7
commit
477dd6c3c7
|
@ -213,6 +213,10 @@ public:
|
|||
virtual void onSuccess() {};
|
||||
};
|
||||
|
||||
// Deprecated declaration
|
||||
CC_DEPRECATED_ATTRIBUTE typedef AssetsManager CCAssetsManager;
|
||||
CC_DEPRECATED_ATTRIBUTE typedef AssetsManagerDelegateProtocol CCAssetsManagerDelegateProtocol;
|
||||
|
||||
NS_CC_EXT_END;
|
||||
|
||||
#endif /* defined(__AssetsManager__) */
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
CC_DEPRECATED_ATTRIBUTE void registerDefaultCCNodeLoaders() { registerDefaultNodeLoaders(); }
|
||||
CC_DEPRECATED_ATTRIBUTE void registerCCNodeLoader(const char * pClassName, NodeLoader * pNodeLoader) { registerNodeLoader(pClassName, pNodeLoader); };
|
||||
CC_DEPRECATED_ATTRIBUTE void unregisterCCNodeLoader(const char * pClassName) { unregisterNodeLoader(pClassName); };
|
||||
CC_DEPRECATED_ATTRIBUTE NodeLoader * getCCNodeLoader(const char * pClassName) { getNodeLoader(pClassName); } ;
|
||||
CC_DEPRECATED_ATTRIBUTE NodeLoader * getCCNodeLoader(const char * pClassName) { return getNodeLoader(pClassName); };
|
||||
|
||||
public:
|
||||
static NodeLoaderLibrary * getInstance();
|
||||
|
|
|
@ -79,8 +79,7 @@ CC_DEPRECATED_ATTRIBUTE typedef NodeLoaderLibrary CCNodeLoaderLibrary;
|
|||
CC_DEPRECATED_ATTRIBUTE typedef MenuItemLoader CCMenuItemLoader;
|
||||
CC_DEPRECATED_ATTRIBUTE typedef LayerColorLoader CCLayerColorLoader;
|
||||
CC_DEPRECATED_ATTRIBUTE typedef LabelTTFLoader CCLabelTTFLoader;
|
||||
CC_DEPRECATED_ATTRIBUTE typedef AssetsManager CCAssetsManager;
|
||||
CC_DEPRECATED_ATTRIBUTE typedef AssetsManagerDelegateProtocol CCAssetsManagerDelegateProtocol;
|
||||
|
||||
|
||||
#if CC_ENABLE_BOX2D_INTEGRATION || CC_ENABLE_CHIPMUNK_INTEGRATION
|
||||
CC_DEPRECATED_ATTRIBUTE typedef PhysicsSprite CCPhysicsSprite;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include "ExtensionMacros.h"
|
||||
|
||||
#include "AssetsManager/AssetsManager.h"
|
||||
|
||||
#include "CCBReader/CCBFileLoader.h"
|
||||
#include "CCBReader/CCBMemberVariableAssigner.h"
|
||||
#include "CCBReader/CCBReader.h"
|
||||
|
@ -41,6 +39,7 @@
|
|||
#include "network/HttpRequest.h"
|
||||
#include "network/HttpResponse.h"
|
||||
#include "network/HttpClient.h"
|
||||
#include "network/WebSocket.h"
|
||||
#include "network/SocketIO.h"
|
||||
|
||||
// Physics integration
|
||||
|
|
|
@ -28,12 +28,15 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "WebSocket.h"
|
||||
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "libwebsockets.h"
|
||||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class WsMessage
|
||||
|
@ -444,7 +447,7 @@ void WebSocket::onSubThreadEnded()
|
|||
|
||||
int WebSocket::onSocketCallback(struct libwebsocket_context *ctx,
|
||||
struct libwebsocket *wsi,
|
||||
enum libwebsocket_callback_reasons reason,
|
||||
int reason,
|
||||
void *user, void *in, size_t len)
|
||||
{
|
||||
//CCLOG("socket callback for %d reason", reason);
|
||||
|
|
|
@ -32,9 +32,12 @@
|
|||
|
||||
#include "ExtensionMacros.h"
|
||||
#include "cocos2d.h"
|
||||
#include "libwebsockets.h"
|
||||
#include <list>
|
||||
|
||||
struct libwebsocket;
|
||||
struct libwebsocket_context;
|
||||
struct libwebsocket_protocols;
|
||||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class WsThreadHelper;
|
||||
|
@ -132,7 +135,7 @@ private:
|
|||
friend class WebSocketCallbackWrapper;
|
||||
int onSocketCallback(struct libwebsocket_context *ctx,
|
||||
struct libwebsocket *wsi,
|
||||
enum libwebsocket_callback_reasons reason,
|
||||
int reason,
|
||||
void *user, void *in, size_t len);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue