UDP is a
Stateless protocol - Wikipedia[
^] where you don't have any feedback.
If you need some kind of acknowledgement, it has to be implemented in the top protocol. That means you have to define such a protocol or use an existing one and implement it in code. But it is usually better to use TCP instead of UDP in such cases to avoid implementing most of the stateful features.
Quote:
I have tried to send packets to UDP server. I am receiving the same packets in the receiver. Is that mean packets are successfully sent?
It is not clear what you mean here. If the server is just echoing back the received packets to the client, it is some kind of verification / acknowledgement. But not a reliable one. A reliable verification requires that senders are maintaining a list of send packets where the packets can be identified. This applies also to the acknowledgement packets where the initial receiver is now a sender. It even gets more complicated because it is not guranteed that packets are received in order.
If you think about all this and how to implement it, you will find out that there is an existing protocol that does this already: TCP.