When I use UDPSocket, it returns "error sending data: 13", do u know what is the problem?
I using B4i 6.5 and IOS 12.4.8, Hope you can help, Thanks.
I using B4i 6.5 and IOS 12.4.8, Hope you can help, Thanks.
B4X:
Sub Process_Globals
Dim UDPSocket1 As UDPSocket
End Sub
Private Sub Application_Start (Nav As NavigationController)
UDPSocket1.Initialize("UDP", 30303, 8000)
End Sub
Public Sub DiscoverIP
Dim Packet As UDPPacket
Dim data() As Byte
Dim strCmd As String = "Discovery"
data = strCmd.GetBytes("UTF8")
Packet.Initialize(data, "255.255.255.255", 30303)
UDPSocket1.send(Packet)
End Sub