B4X:
Private myUDP As UDPSocket
Private Packet As UDPPacket
Private UDPTimeout As Timer
UDPTimeout.Initialize("UDPTimeout", 2000)
Sub UDPTimeout_Tick
UDPTimeout.Enabled = False
ProgressDialogHide
Timer1.Enabled=False
Msgbox("Timeout!" , "Error")
Sleep(3000)
Timer1.Enabled=True
End Sub
SUB SEND_UDP(IP AS STRING,port as int)
z = XXXXXX.EncodeBuf
Dim buffer (z.Length) As Byte
For cnt = 0 To z.Length - 1
buffer(cnt) = Asc(z.CharAt(cnt))
Next
' Gestione del pacchetto dati e del Timeout
UDPTimeout.Enabled = True
Packet.Initialize( buffer,ip, port)
myUDP.Send(Packet)
END SUB
here is ARP packet code pictures, get by wirshark. who can help me ?