Sub Astreams1_NewData (Buffer() As Byte)
Dim u As String
Dim lpos As Long
Dim rpos As Long
u=(u&BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
str_ = str_ & u
Log ("stringa lunghezza" & str_.Length)
Log ("string base " & str_)
If str_.Length > 160 Then
lpos=str_.IndexOf("{")
rpos=str_.IndexOf2("}",lpos+1)
If lpos < 0 Then
Log("lpos negativo ----------------------------------------------")
str_=" "
End If
If lpos>=0 Then
If rpos > lpos Then
If str_.Length >170 Then
str_ = "" ' for delete the string'
Else
s = sf.Mid(str_,lpos+1,(rpos+lpos)+1) 'change -1'
json_interpreter1(s) 'change the buffer'
Log ("json string" &s)
Log("Lenght" & S.Length)
str_=sf.Right(str_,(str_.Length-rpos)-1)
End If
End If
End If
End If
End Sub