mirror of
https://gitee.com/willfree/minbrowser.git
synced 2026-06-03 08:16:50 +08:00
微调了min-http数据交互协议
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#\u4FEE\u6539\u914D\u7F6E\u6587\u4EF6
|
||||
#Tue Dec 22 20:15:22 CST 2020
|
||||
ServerIPAddress=219.223.196.164
|
||||
#Mon Dec 28 19:48:19 CST 2020
|
||||
ServerIPAddress=219.223.192.199
|
||||
MIS_PORT=13899
|
||||
DataPackagePrefix=/MIN/Nginx/test2
|
||||
ServerPortAddress=6363
|
||||
ThreadNumberForFileTransfer=5
|
||||
DownloadFileDirectory=.\\filecache\\
|
||||
ServerPortAddress=6363
|
||||
MIS_IP=121.15.171.91
|
||||
DownloadFileDirectory=.\\filecache\\
|
||||
|
||||
@@ -114,6 +114,7 @@ public class MINHTTP_RequestHandler {
|
||||
Integer chunkNums=calcSliceNums(length,chunkSize);
|
||||
System.out.println("本次请求应答数据理应(服务器告诉我的)的总大小:"+length);
|
||||
this.responseData=new byte[Math.toIntExact(length)];
|
||||
int headLens=0; // MIN-HTTP头部字段的长度
|
||||
for(int i=0;i<chunkNums;i++){
|
||||
interestNameString=this.serverPrefix+MINHTTP_MINPrefixUtil.SessionString
|
||||
+"/MIN_HTTP_RESPONSE"+"/"+this.session.getSessionID()
|
||||
@@ -123,8 +124,15 @@ public class MINHTTP_RequestHandler {
|
||||
if(isTimeoutOrNack(dataSliceResponse)){
|
||||
return false;
|
||||
}
|
||||
if(i==0){
|
||||
headLens=dataSliceResponse.length;
|
||||
}
|
||||
System.out.println("本次接收到的应答数据块大小[ "+i+" ]:"+dataSliceResponse.length);
|
||||
ByteArrayUtil.insertByteArray(this.responseData,dataSliceResponse,i*chunkSize);
|
||||
if(i==0) {
|
||||
ByteArrayUtil.insertByteArray(this.responseData, dataSliceResponse, 0);
|
||||
}else{
|
||||
ByteArrayUtil.insertByteArray(this.responseData,dataSliceResponse,(i-1) * chunkSize+headLens);
|
||||
}
|
||||
}
|
||||
// 测试代码段START
|
||||
// interestNameString=this.serverPrefix+MINHTTP_MINPrefixUtil.SessionString
|
||||
|
||||
Reference in New Issue
Block a user