Reputation: 559
I have a requirement where i need to test the time required to send a few bytes. But instead of writing a socket program and jumping into the complexities , i just want to dump the byte 'into the dark' without caring for whether the connection is made or the byte is received. My sole aim is to measure the time taken for the program to send those many bytes. What could be the best way to achieve something like this?
Upvotes: 0
Views: 111
Reputation: 54312
UDP should do what you want. You can use DatagramSocket for it in Java.
UDP is a network protocol that doesn't establish a connection before sending data, and doesn't have any (built-in) way to make sure the other side received it.
Upvotes: 3