diff --git a/native/cocos/network/HttpClient-apple.mm b/native/cocos/network/HttpClient-apple.mm index 71e0aef75d..b071386ab9 100644 --- a/native/cocos/network/HttpClient-apple.mm +++ b/native/cocos/network/HttpClient-apple.mm @@ -496,26 +496,6 @@ void HttpClient::decreaseThreadCountAndMayDeleteThis() { } } -void HttpClient::setTimeoutForConnect(int value) { - std::lock_guard lock(_timeoutForConnectMutex); - _timeoutForConnect = value; -} - -int HttpClient::getTimeoutForConnect() { - std::lock_guard lock(_timeoutForConnectMutex); - return _timeoutForConnect; -} - -void HttpClient::setTimeoutForRead(int value) { - std::lock_guard lock(_timeoutForReadMutex); - _timeoutForRead = value; -} - -int HttpClient::getTimeoutForRead() { - std::lock_guard lock(_timeoutForReadMutex); - return _timeoutForRead; -} - const std::string &HttpClient::getCookieFilename() { std::lock_guard lock(_cookieFileMutex); return _cookieFilename; diff --git a/native/cocos/network/HttpClient-java.cpp b/native/cocos/network/HttpClient-java.cpp index 7aea4c81d8..90a7f06087 100644 --- a/native/cocos/network/HttpClient-java.cpp +++ b/native/cocos/network/HttpClient-java.cpp @@ -935,26 +935,6 @@ void HttpClient::decreaseThreadCountAndMayDeleteThis() { } } -void HttpClient::setTimeoutForConnect(int value) { - std::lock_guard lock(_timeoutForConnectMutex); - _timeoutForConnect = value; -} - -int HttpClient::getTimeoutForConnect() { - std::lock_guard lock(_timeoutForConnectMutex); - return _timeoutForConnect; -} - -void HttpClient::setTimeoutForRead(int value) { - std::lock_guard lock(_timeoutForReadMutex); - _timeoutForRead = value; -} - -int HttpClient::getTimeoutForRead() { - std::lock_guard lock(_timeoutForReadMutex); - return _timeoutForRead; -} - const std::string &HttpClient::getCookieFilename() { std::lock_guard lock(_cookieFileMutex); return _cookieFilename; diff --git a/native/cocos/network/HttpClient.cpp b/native/cocos/network/HttpClient.cpp index 35cd34c829..146dde8ab0 100644 --- a/native/cocos/network/HttpClient.cpp +++ b/native/cocos/network/HttpClient.cpp @@ -538,26 +538,6 @@ void HttpClient::decreaseThreadCountAndMayDeleteThis() { } } -void HttpClient::setTimeoutForConnect(int value) { - std::lock_guard lock(_timeoutForConnectMutex); - _timeoutForConnect = value; -} - -int HttpClient::getTimeoutForConnect() { - std::lock_guard lock(_timeoutForConnectMutex); - return _timeoutForConnect; -} - -void HttpClient::setTimeoutForRead(int value) { - std::lock_guard lock(_timeoutForReadMutex); - _timeoutForRead = value; -} - -int HttpClient::getTimeoutForRead() { - std::lock_guard lock(_timeoutForReadMutex); - return _timeoutForRead; -} - const std::string &HttpClient::getCookieFilename() { std::lock_guard lock(_cookieFileMutex); return _cookieFilename; diff --git a/native/cocos/network/HttpClient.h b/native/cocos/network/HttpClient.h index 5302bc765b..f5a5e0f84d 100644 --- a/native/cocos/network/HttpClient.h +++ b/native/cocos/network/HttpClient.h @@ -113,38 +113,6 @@ public: */ void sendImmediate(HttpRequest *request); - /** - * Set the timeout value for connecting. - * - * @param value the timeout value for connecting. - * @deprecated Please use `HttpRequest.setTimeout` instead. - */ - CC_DEPRECATED_ATTRIBUTE void setTimeoutForConnect(int value); - - /** - * Get the timeout value for connecting. - * - * @return int the timeout value for connecting. - * @deprecated Please use `HttpRequest.getTimeout` instead. - */ - CC_DEPRECATED_ATTRIBUTE int getTimeoutForConnect(); - - /** - * Set the timeout value for reading. - * - * @param value the timeout value for reading. - * @deprecated Please use `HttpRequest.setTimeout` instead. - */ - CC_DEPRECATED_ATTRIBUTE void setTimeoutForRead(int value); - - /** - * Get the timeout value for reading. - * - * @return int the timeout value for reading. - * @deprecated Please use `HttpRequest.setTimeout` instead. - */ - CC_DEPRECATED_ATTRIBUTE int getTimeoutForRead(); - HttpCookie *getCookie() const { return _cookie; } std::mutex &getCookieFileMutex() { return _cookieFileMutex; } diff --git a/native/cocos/network/SocketIO.cpp b/native/cocos/network/SocketIO.cpp index 31426c972a..18b4eb45f4 100644 --- a/native/cocos/network/SocketIO.cpp +++ b/native/cocos/network/SocketIO.cpp @@ -998,10 +998,6 @@ void SocketIO::destroyInstance() { CC_SAFE_DELETE(inst); } -SIOClient *SocketIO::connect(SIODelegate &delegate, const std::string &uri) { - return SocketIO::connect(uri, delegate); -} - SIOClient *SocketIO::connect(const std::string &uri, SIODelegate &delegate) { return SocketIO::connect(uri, delegate, ""); } diff --git a/native/cocos/network/SocketIO.h b/native/cocos/network/SocketIO.h index 8f9c91e016..8b1b6ed695 100644 --- a/native/cocos/network/SocketIO.h +++ b/native/cocos/network/SocketIO.h @@ -130,14 +130,6 @@ public: */ static SIOClient *connect(const std::string &uri, SIODelegate &delegate, const std::string &caFilePath); - /** - * Static client creation method, similar to socketio.connect(uri) in JS. - * @param delegate the delegate which want to receive events from the socket.io client. - * @param uri the URI of the socket.io server. - * @return SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr. - */ - CC_DEPRECATED_ATTRIBUTE static SIOClient *connect(SIODelegate &delegate, const std::string &uri); - private: SocketIO(); virtual ~SocketIO();