About Store Forum Documentation Contact
Donations:
215$/mo



Post Reply 
Question about FastConnection
Author Message
MrPi Offline
Member

Post: #1
Question about FastConnection
I have read the comment about FastConnection saying:

PHP Code:
// fast but unreliable UDP based connection, data is not guaranteed to reach the target, order of received data is not guaranteed to be the same as when sending, received data size will always be the same as when it was sent 

Why is the data order not guaranteed to be the same for one packet?
As far as I know with UDP, if a single packet is successfully received, the data inside is complete, just as it was sent. Just the fact that it arrives is not certain.
(This post was last modified: 02-12-2014 01:42 PM by MrPi.)
02-12-2014 01:36 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: Question about FastConnection
I believe he means packets are not in guaranteed order instead of data.
02-12-2014 01:48 PM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #3
RE: Question about FastConnection
FastConnection = UDP (session-less, order and delivery not guaranteed)
Connection = TCP (session-based, order and delivery guaranteed)
02-12-2014 05:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #4
RE: Question about FastConnection
That's exactly the reply that misses the point. But thank you, I know how TCP and UDP work.
The comment was indicating that the order of the data inside one packet is not guaranteed, which is wrong to my knowledge. It's probably just a confusing comment.
02-12-2014 05:43 PM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #5
RE: Question about FastConnection
Gotcha. I actually have NAT punch-through working using UDP using pure EE libs. You are right, what's sent, if successful, is what's received. The data is intact as is, nothing jumbles the actual data when it is sent over. Actually, there isn't any protocol out there that coincidentally jumbles the actual data in the transmission (it won't make sense to do it if there is no rhyme or reason to the order). Ones that do it purposely are probably the encryption over the wire and similar things which has a pattern to how the data is scrambled.
(This post was last modified: 02-12-2014 07:51 PM by aceio76.)
02-12-2014 07:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Question about FastConnection
"order of received data is not guaranteed to be the same as when sending"
By this I mean when you make multiple calls of sending data, then different calls may reach with different order, but their contents will be unmodified
02-13-2014 11:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #7
RE: Question about FastConnection
updated it to:
"fast but unreliable UDP based connection, data is not guaranteed to reach the target, multiple data packets may not always be received in the same order as they were sent, received data size will always be the same as when it was sent"
02-13-2014 11:56 PM
Find all posts by this user Quote this message in a reply
Post Reply