mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-25 11:18:30 +00:00
[adapters] 多线程内的网络调用启用高性能模式,并支持 Http2、Quic/Http3
This commit is contained in:
parent
195434e30e
commit
f9c85aedda
@ -68,6 +68,9 @@ var fsUtils = {
|
|||||||
downloadFile(remoteUrl, filePath, header, onProgress, onComplete) {
|
downloadFile(remoteUrl, filePath, header, onProgress, onComplete) {
|
||||||
var options = {
|
var options = {
|
||||||
url: remoteUrl,
|
url: remoteUrl,
|
||||||
|
useHighPerformanceMode: true,
|
||||||
|
enableHttp2: true,
|
||||||
|
enableQuic: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
onComplete && onComplete(null, res.tempFilePath || res.filePath);
|
onComplete && onComplete(null, res.tempFilePath || res.filePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user