Drops New Member Mar 12, 2021 #1 Hello, I need help with my problem. I can use (waitfor) to udp packet received, if packet no received for ex.10 second then close (waitfor) and continue program. Code: Wait For EventName_PacketArrived (Packet As UDPPacket)
Hello, I need help with my problem. I can use (waitfor) to udp packet received, if packet no received for ex.10 second then close (waitfor) and continue program. Code: Wait For EventName_PacketArrived (Packet As UDPPacket)
Eme Fibonacci Well-Known Member Licensed User Longtime User Mar 13, 2021 #2 Maybe something like this B4X: UDPTimeout Wait For EventName_PacketArrived (Packet As UDPPacket) If Not(Packet=Null) Then Log("packet arrived") Else Log("timeout") End If Sub UDPTimeout Sleep(10000) CallSubDelayed2(Me,"EventName_PacketArrived",Null) End Sub Upvote 0
Maybe something like this B4X: UDPTimeout Wait For EventName_PacketArrived (Packet As UDPPacket) If Not(Packet=Null) Then Log("packet arrived") Else Log("timeout") End If Sub UDPTimeout Sleep(10000) CallSubDelayed2(Me,"EventName_PacketArrived",Null) End Sub
LucaMs Expert Licensed User Longtime User Mar 13, 2021 #3 https://www.b4x.com/android/forum/threads/b4x-waitforwithtimeout-timeouthandler.110703/#content Upvote 0