I have the UDPSocket.Close and still the same error!.. I also have the Sleep(5000) afer UDPSocket.Send(Packet)
If UDPSocket.IsInitialized=False Then
UDPSocket.Initialize("UDP",7000,128) 'Port and buffer size can be changed
End If
Dim Packet As UDPPacket
Dim bdata() As Byte
bdata = data.GetBytes("ASCII")
Packet.Initialize(bdata, ip,xxxx)
UDPSocket.Send(Packet)
Sleep(5000)
UDPSocket.Close
Is the same Error:
java.io.IOException: Operation not permitted
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:696)
at anywheresoftware.b4a.objects.SocketWrapper$UDPSocket$1.run(SocketWrapper.java:479)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)