我下载文件后,它给我的原始文件比原始文件小? 如果文件大小 2014 k 我只收到 1024 k 且会丢失连接
While True
Dim numArray As Byte() = New Byte(1024) {}
c.Poll(-1, SelectMode.SelectRead)
Dim count As Long = c.Receive(numArray, 0, numArray.Length, SocketFlags.None)
dw.FS.Write(numArray, 0, count)
ind.long_1 += CLng(count)
num3 += count
Dim progressBar As ProgressBar = dw.ProgressBar1
progressBar.Value = progressBar.Value + count
dw.FS.Flush()
Dim tr As Long = dw.SZ
If num3 < tr Then
Thread.Sleep(1)
Else
Exit While
End If
End While