i have a udp server thats going to send and mp3 file.
when does the client udp know when the udpserver is done sending?

Recommended Answers

All 2 Replies

What do you mean by knowing if it is done? Didn't you also send your packet with the length of the packet itself (using DatagramSocket)? If not, could you post the code portion of server & client?

Are you sure you want to use UDP? An mp3 file would probably occupy many UDP packets. There's no guarantee that a packet will be delivered, nor any way to know you've missed one. Multiple packets may arrive in a different order than that in which they were sent, depending on how they happen to be routed. You'll need to add some extra protocol to manage all that stuff, or just use TCP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.