Skip to content

Combines both tcp and udp with 'DeliveryMethod' #49

Discussion options

You must be logged in to vote

Ohh:: It's very simple adding ordered UDP.

Well let's separate something here, ordered UDP does not mean reliable UDP, it just means that after recent data is received the old data will be discarded so as not to create problems by e.g. "Player moving forward and then backward" (due to the old data).

So with this in mind we can add an ID per message as soon as the message ID if is less than the previous message means old data (so we will delete/destroy/discard it), thus now having the effect of (Ordered data)

Code:

public enum DeliveryMethod : byte
{
    Unreliable = 4, // UDP
    
    ReliableUnordered = 0, // TCP
    
    Sequenced = 1, // TCP
    
    ReliableOrdered = 2, // TCP

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@nvh2001
Comment options

@alec1o
Comment options

Comment options

You must be logged in to vote
4 replies
@vanhaodev
Comment options

@alec1o
Comment options

@vanhaodev
Comment options

@alec1o
Comment options

Answer selected by alec1o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants