Sub Process_Globals
Dim usocket As UDPSocket
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
usocket.Initialize("usocket", 0, 0)
End If
End Sub
Sub SendString(ip As String, port As Int, s As String)
Dim u As UDPPacket
u.Initialize(s.GetBytes("UTF8"), ip, port)
usocket.Send(u)
End Sub
I'm curious... when sending out a UDP packet does it need to contain certain data or be sent to a certain port in order for certain devices to respond to it? I was trying to do this the other day but had no luck. Wireshark showed UDP packets leaving my app but nothing ever seemed to respond. I was following other sample code on this forum and even added broadcast packet receiver code (through reflection) which added the WiFi permission to receive IP broadcast packets.
I never figured out what I was doing wrong, but seeing this thread has me wondering if perhaps I can take another shot at it.