Send single UDP data

Hey guys, I'm trying to send a single udp datagram from a client to a remote server. When i try to send a single data (a string) the server receive nothing. So I have tried with a loop that send 1000 times the same data. On the server I count how many times a UDP datagram is received. This number is between [300-305], so about 700 packets are lost.
I know that UDP is connectionless, but this difference it's too hight. Is it normal?
Thanks in advance
PS
(the client runs on my own laptop and the server runs on a virtual machine also on my laptop)

Simone
If you are sending UDP packets to your own computer I don't think you should loose any packets at all. Maybe you are sending the packets too fast. Try putting a small delay before sending each packet.
can you temporarily run the server on your machine as well? Just to rule out the VM being the issue?
When i try to send a single data (a string) the server receive nothing.
My guess is that you have some kind of problem. What happens when you ping the server from the client?

UDP doesn't guarantee delivery, but it's not that bad.
The OS is probably dropping some packets sent through the network. Try sending more data less frequently.
Last edited on
Thanks to all!
I will try and I will post the results
Topic archived. No new replies allowed.