Unreliable bunches

When sending messages via UChannel::SendBunch with the bunch’s reliable flag set to false does anyone know how UE4 deals with the issue of out-of-order messaging and message duplication?

Does UE4 ensure messages arrive in order and are there any controls in code to allow/prevent out-of-order delivery?

Does UE4 prevent message duplication?

Any help would be most appreciative,

Thanks,

Phil.

Messages should never be out of order, since we drop packets that have older sequences than the last known one.

Unreliable bunches could be dropped though, and are not re-sent. For RPC’s this means the function won’t be called, unless the call is made again in the future (and it makes it through that time).

For unreliable bunches and properties, they are semi-reliable. i.e. if you only change the property once, it will eventually get there, since we manually handle that with acks internally. If packets are dropped, properties could be combined into the same packet, even if they were sent on separate frames. Also, in this case (unreliable), if a property looked like this over time: 1,2,3,4… It might go from 1 straight to 4 on the client, but the client is eventually guaranteed to have the latest version at some point.

For reliable bunches, they are guaranteed to be in order (relative to other reliable bunches on that channel only), and never be dropped.

Let me know if you need more clarification!

Thanks for the answers, we have some follow up questions if that’s ok.

Just to clarify, we have created a channel for messaging outside of the replication system and have our own buffers for sending/receiving unreliable data. We have time stamped our messages so we know where to insert our received messages into our receive buffer. Our system can cope with lost packets and we have the potential to receive out-of-order packets as well. Are there any plans to support out-of-order delivery within UE4?

From your description of sequence numbers are we correct in assuming that a duplicate packet would be discarded automatically by UE4?

We are currently using the same channel for sending both unreliable and reliable bunches. Will the reliable bunches interfere in anyway with the delivery of unreliable bunches? i.e. will an unreliable bunch be delivered even when a reliable bunch has been delayed?

Thanks again for the help,

Phil.

Are there any plans to support
out-of-order delivery within UE4?

We currently support this per channel, if you mark the bunch as reliable when sending data on that channel. Depending on how you are sending the data, you may need to mark the channel manually, unless you are sending via RPC, then you can just mark the RPC as reliable.

will an unreliable bunch be delivered
even when a reliable bunch has been
delayed?

Yes, unreliable bunches will arrive before reliable, if the reliable was dropped.

Hopefully this clarifies things, if not, let us know!

Unfortunately, there are low level bits that require us to throw out packets that are out of order, so it wouldn’t be easy to support at this time.

Sorry my first follow up question wasn’t clear as I didn’t make it clear that I was asking about out-of-order delivery of unreliable bunches. The question should have read: “Are there any plans to support out-of-order delivery of unreliable bunches within UE4?” i.e. an out of order unreliable bunch will be discarded (according to your first reply) but if we could still get hold of that data then it would be useful for us.

Thanks,

Phil.