Why remove network on cocos2d-x 3.0 beta?

Why remove network on cocos2d-x 3.0 beta?
0.0 0


Why remove network from cocos-ext.h, it’s a bug or something else?
#include “network/HttpRequest.h”
#include “network/HttpResponse.h”
#include “network/HttpClient.h”
#include “network/WebSocket.h”
#include “network/SocketIO.h”

[SOLVED] Use network extension in cocos2d-x 3.8 (iOS)

The network part is one of the main cores in cocos2d-x, it’s no longer a extension part.
So we change the path to make it more clearly.


How are we supposed to now use the network classes?

At the moment, in iOS/Mac projects I have no issues but it appears to be unlocatable in Android and win32 projects.

In Visual Studio I can access functions like this:
network::HttpRequest *request = new network::HttpRequest();
if I include the header like this:
@#include "HttpClient.h"
otherwise, the network classes are invisible.

However, I still get errors making it unusable:
@Error 350 error LNK2019: unresolved external symbol "public: static class cocos2d::network::HttpClient * __cdecl cocos2d::network::HttpClient::getInstance(void)" (?getInstanceHttpClient@network@cocos2d@SAPAV123XZ)

Android is equally unusable, saying HttpClient.h is an unrecognised file or directory however I try to use it.


I could compile network modules by adding these lines to Android.mk in my project.

LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static

$(call import-module,network)



I found you should also add

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \


As gonjay said, it is necessary to include network sources.

Thanks for further information I’ve missed!