I want to know how Dplay Message Guaranteed work?
when use send message with DPSEND_GUARANTEED, why spend
if Dplay send this message more times untill receive a
replay to this message?
Does Send message function not return immediatly?
thank every who can help me!
Whether Send returns immediately or not depends whether u are calling Send with synchronous or async flag.
As for the guaranteed, it means when the message is broken up into small packets and send over the network, the message is guaranteed to appear on the other side..
The sad thing is if one packet is lost, the whole message is meaningless and is discarded..
So how does the sender knows if the recevier has got the whole message? The receiver must acknowledge to the sender that is has received the message so the sender will not keep sending it,
but what happens if the acknowledgement message from the recevier gets lost..then all the networking headaches come in, which you can find more details in any decent networking book.
This is all about network protocol. You only need to be bothered whether you want your application to wait until the receiver is guaranteed to have receive the message or not, by specifying the flags in the Send function