Sub fillmydata(mystring As String)
If myMessageis.Contains("i Parsing reponse") Then
myFileSize = myMessageis.IndexOf("i Parsing reponse")
End If
If myMessageis.Contains("i Download Complete") Then
myFileDone = myMessageis.IndexOf("i Parsing reponse")
End If
If (myFileSize >0) Then
txtLog.Text = "FileSize has been sent.."
currentFile = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
ReceivingFile = True
downloading = True
End If
myMessageis = myMessageis & mystring
txtLog.Text = txtLog.Text & mystring
txtLog.SelectionStart = txtLog.Text.Length
End Sub
Sub AStream_NewData (Buffer() As Byte)
fillmydata(BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
myBytes = myBytes + Buffer.Length
txtLastReading.Text = myBytes & " Bytes"
If downloading Then
ProgressDialogShow("Downloading... "& CRLF & CRLF & "[ ~ Bytes Recieved ]...".Replace("~", myBytes))
End If
End Sub