@kennethlimcp could you try printing the result from parsePacket() when receiving the UDP, i think there was an issue with it not respecting datagram boundries… it gives you the size of whole buffer not the size of the datagram
And the UDP write sends a datagram for each write and the end packet does nothing. bko gave me some code to buffer it and send as one datagram
lots of good info here…