Hi guys
I've found a bug in the initialize2 procedure for UDP. in B4A warks flawlessly... in B4i dosn't work.
Code :
Dim UDPMessage(122) as Byte
UDPMessage(0) = 1
UDPMessage(1) = 2
UDPMessage(2) = 3
UPDPacket.initialize2(UDPMessage, 0, 3, "192.168.0.100", 5000)
In B4A the device receive an UDP message of 3 bytes. In B4i receive a message of 122 bytes. The length is ignored with the other elements obviously at zero.
In order to send 3 elements in b4i I have to define the UDPMessage with 3 elements.
Since our packets are not fixed dimensions, I need a big container and choose how many elements send based on the command I want to send to the receiver.
I've tried to define dynamically the lenght of the container using
Dim UDPMessage(lenght) as byte
but I'm loosing some packets...
No packet loss in b4a.
Sincerely
I've found a bug in the initialize2 procedure for UDP. in B4A warks flawlessly... in B4i dosn't work.
Code :
Dim UDPMessage(122) as Byte
UDPMessage(0) = 1
UDPMessage(1) = 2
UDPMessage(2) = 3
UPDPacket.initialize2(UDPMessage, 0, 3, "192.168.0.100", 5000)
In B4A the device receive an UDP message of 3 bytes. In B4i receive a message of 122 bytes. The length is ignored with the other elements obviously at zero.
In order to send 3 elements in b4i I have to define the UDPMessage with 3 elements.
Since our packets are not fixed dimensions, I need a big container and choose how many elements send based on the command I want to send to the receiver.
I've tried to define dynamically the lenght of the container using
Dim UDPMessage(lenght) as byte
but I'm loosing some packets...
No packet loss in b4a.
Sincerely