Private Sub AStream_Error
CallSubDelayed2(Main,"logjk","Error: " & LastException)
End Sub
Private Sub AStream_Terminated
Dim id As String
CallSubDelayed2(Main,"logjk","Feedback terminated")
ID_DEL.Clear
For i = 0 To buffer.Size - 1 Step 38
Dim date() As Byte = SubListToArray(i, 4)
Dim token() As Byte = SubListToArray(i + 6, 32)
Log(bc.IntsFromBytes(date)(0))
Dim HexToken As String = bc.HexFromBytes(token)
'Log($"Deleting token ${HexToken}"$)
CallSubDelayed2(Main,"logjk",$"Deleting token ${HexToken}"$)
'Main.db.ExecNonQuery2("DELETE FROM tokens WHERE token = ?", Array(HexToken))
ID_DEL.Add(HexToken)
Next
If ID_DEL.Size=0 Then
CallSubDelayed2(Main,"logjk","Message was send")
'Main.fx.Msgbox(Main.MainForm, "Message was send", "Info")
'ExitApplication
End If
If ID_DEL.Size>0 Then
id = ID_DEL.Get(0)
ID_DEL.RemoveAt(0)
CallSubDelayed2(Main,"logjk","TO DELETE: " & id)
Dim job2 As HttpJob
job2.Initialize("job2",Me)
job2.Download(Main.url_a & "&mess=DEL&id=" & id)
End If
End Sub