So what my problem is that I have a tcp application, sending a file (in bytes) to my current application, witch (for now) is just supposed to check if the bytes sendt are equal to the bytes recieved. (Sending and reciving in the same application).
Now my problem is that the while loop does not appear to stop, but when I check the debug log it does not appear to continue ether. As the application prints "Recieved & Number of bytes recived" every frame, nor does it print what's after the while loop.
I'v also tried various loops, they all appear to be stuck.
Debug log:
It sucessfully shows the "Recieved xxxx" untill X (NBR) number of bytes is 0, but is does not print what it's supposed to print right after the while loop.
also the sub "a" is just a basic print sub, think of it as Print("Text")
Thanks for any help! (in advance :D)
PHP Code
<?php
Sub Read()
a("Initialized reading")
Dim Byts2 As New List(Of Byte)
a("Vars ok")
' Try
Dim FileStr As NetworkStream = SockTcp.GetStream
Dim NBR As Integer = 0
Do
Dim Temp(SockTcp.ReceiveBufferSize) As Byte
NBR = SockTcp.Client.Receive(Temp, 0, Temp.Length, SocketFlags.None)
Byts2.AddRange(Temp)
a("Recived " & NBR)
Loop While NBR > 0
'FileStr.Close()
'FileStr.Dispose()
'Loop
' Catch ex As Exception
'a("Ex: " & ex.Message)
' End Try
a("Done looping #2")
a("Size of 1 was " & Byts.Length)
a("Size of 2 was " & Byts2.Count)
If Byts Is Byts2.ToArray Then
a("Sucess")
Else
a("Error, not equal")
End If
File.WriteAllBytes("C:\Fraps\test.txt", Byts2.ToArray)
End Sub
I'v also tried various loops, they all appear to be stuck.
Debug log:
PHP Code
<?php
Sendt data
Initialized reading
Vars ok
Recived 8193
Recived 8193
Recived 8193
Recived 8193
Recived 8193
Recived 8193
Recived 8193
Recived 8193
Recived 3248
also the sub "a" is just a basic print sub, think of it as Print("Text")
Thanks for any help! (in advance :D)


![[Image: WMwSRhx.gif]](https://i.imgur.com/WMwSRhx.gif)

