diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index a814b29e85..46e725ac26 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -148,6 +148,11 @@ void HttpClient::handleNetworkStatusChanged() _service->set_option(YOPT_S_DNS_DIRTY, 1); } +yasio::io_service* HttpClient::getInternalService() +{ + return _service; +} + bool HttpClient::send(HttpRequest* request) { if (!request) return false; diff --git a/cocos/network/HttpClient.h b/cocos/network/HttpClient.h index 087c5ad655..fede8e0fdf 100644 --- a/cocos/network/HttpClient.h +++ b/cocos/network/HttpClient.h @@ -193,6 +193,8 @@ public: * When the device network status chagned, you should invoke this function */ void handleNetworkStatusChanged(); + + yasio::io_service* getInternalService(); private: HttpClient();