iOS Question UDP Initialize2 bug

Andrea Falcucci

Member
Licensed User
Longtime User
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
 

Andrea Falcucci

Member
Licensed User
Longtime User
I still have some problems.

Copied the XML in the Windows machine and replaced the .a and .h on the local mac.

I need to investigate further.

Thanks for the prompt reply. I'll keep you posted
 
Upvote 0

Andrea Falcucci

Member
Licensed User
Longtime User
nothing to do.... updated the libraries on the mac. Executed a reboot. removed the app from the iphone. changed the xml in the windows machine. restarted program.

No success...
 
Upvote 0
Top