<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Reliability and Flow Control</title>
	<atom:link href="http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://gafferongames.com</link>
	<description>Glenn Fiedler&#039;s Game Development Articles and Tutorials</description>
	<lastBuildDate>Tue, 03 Apr 2012 03:04:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-43303</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Mon, 02 Apr 2012 06:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-43303</guid>
		<description>RUDP is OK. If you have that available, why not try it and see?</description>
		<content:encoded><![CDATA[<p>RUDP is OK. If you have that available, why not try it and see?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-43134</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sat, 31 Mar 2012 19:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-43134</guid>
		<description>Hi Glenn

This topic looks very interesting. If I was to use a network engine such as Lidgren 3 (C#) which supports Ordered/Unordered RUDP, would the above be necessary ? I get that sequencing would be useful especially when following the Tribes model for adding priority on what data should be sent 1st. Sorry just trying to wrap my head around all these topics. I wish there was a simple way to discuss prediction, extrapolation (lerping/smoothing) and lag all at the same time... Let us already assume the internet sucks as always. 

Another thing that concerns me is dealing with collisions or how to apply deal with creating simple colliders before diving right into adding network physics. I find lots of libs out there that discuss physics integrated with a specific engine: OpenGL, DirectX, Ogre, SDL, XNA, Unity whatever. They all have their own way of dealing with geometry. I wish to a simple universal view prior to choosing graphics. As the server will be headless in most cases anyway.</description>
		<content:encoded><![CDATA[<p>Hi Glenn</p>
<p>This topic looks very interesting. If I was to use a network engine such as Lidgren 3 (C#) which supports Ordered/Unordered RUDP, would the above be necessary ? I get that sequencing would be useful especially when following the Tribes model for adding priority on what data should be sent 1st. Sorry just trying to wrap my head around all these topics. I wish there was a simple way to discuss prediction, extrapolation (lerping/smoothing) and lag all at the same time&#8230; Let us already assume the internet sucks as always. </p>
<p>Another thing that concerns me is dealing with collisions or how to apply deal with creating simple colliders before diving right into adding network physics. I find lots of libs out there that discuss physics integrated with a specific engine: OpenGL, DirectX, Ogre, SDL, XNA, Unity whatever. They all have their own way of dealing with geometry. I wish to a simple universal view prior to choosing graphics. As the server will be headless in most cases anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-36528</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Tue, 31 Jan 2012 03:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-36528</guid>
		<description>Hi! It&#039;s not for security reasons but so that it can do NAT punch-through for you -- eg. connect P2P through firewalls. It&#039;s hard to code that yourself, and error prone, using a library like RakNet or OpenTNL to do that for you is wise. Also, look at &quot;ENet&quot;

Good luck!</description>
		<content:encoded><![CDATA[<p>Hi! It&#8217;s not for security reasons but so that it can do NAT punch-through for you &#8212; eg. connect P2P through firewalls. It&#8217;s hard to code that yourself, and error prone, using a library like RakNet or OpenTNL to do that for you is wise. Also, look at &#8220;ENet&#8221;</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walid Baccari</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-36437</link>
		<dc:creator>Walid Baccari</dc:creator>
		<pubDate>Mon, 30 Jan 2012 13:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-36437</guid>
		<description>Hi Glenn,

Thanks for tutorials, they have been very helpful for me.

I intend to start working with a team of friends on our first multiplayer online game. I read all the articles of the series networking for game programmers and my only question is how do i change the code in the last example to make the server handle multiple clients each with his own IP address, sequence, ack, and ack_bits?

Also, you mentioned in the commentaries that, for security reasons, a PC programmer should use RackNet or OpenNTL. Does OpenNTL use UDP? And, does it provide reliability and flow control?</description>
		<content:encoded><![CDATA[<p>Hi Glenn,</p>
<p>Thanks for tutorials, they have been very helpful for me.</p>
<p>I intend to start working with a team of friends on our first multiplayer online game. I read all the articles of the series networking for game programmers and my only question is how do i change the code in the last example to make the server handle multiple clients each with his own IP address, sequence, ack, and ack_bits?</p>
<p>Also, you mentioned in the commentaries that, for security reasons, a PC programmer should use RackNet or OpenNTL. Does OpenNTL use UDP? And, does it provide reliability and flow control?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28235</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sun, 11 Dec 2011 07:57:49 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28235</guid>
		<description>Also to learn the security side the best way I&#039;ve found is to consider how you would attack your own protocol. Think as if you were an attacker. It&#039;s a very interesting POV. You actually know much more about your protocol than the attacker, so it&#039;s reasonably easy to spot weaknesses. 

For example, if you know the IP of another player (you always will in P2P games...) you could spoof a packet sent to another computer so it looks like it comes from that players IP but with a really high sequence number. This would cause all packets from that machine to be considered old and that player would time out. Now consider how can you fix this? OK lets add a random guid session id instead of IP as session and it&#039;s much harder to spoof packets.

As for books on security, sorry I don&#039;t have any to recommend. I just work this out as I go :)</description>
		<content:encoded><![CDATA[<p>Also to learn the security side the best way I&#8217;ve found is to consider how you would attack your own protocol. Think as if you were an attacker. It&#8217;s a very interesting POV. You actually know much more about your protocol than the attacker, so it&#8217;s reasonably easy to spot weaknesses. </p>
<p>For example, if you know the IP of another player (you always will in P2P games&#8230;) you could spoof a packet sent to another computer so it looks like it comes from that players IP but with a really high sequence number. This would cause all packets from that machine to be considered old and that player would time out. Now consider how can you fix this? OK lets add a random guid session id instead of IP as session and it&#8217;s much harder to spoof packets.</p>
<p>As for books on security, sorry I don&#8217;t have any to recommend. I just work this out as I go <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28233</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sun, 11 Dec 2011 07:53:25 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28233</guid>
		<description>OK so the first example of not hardening is that the packets have no encryption to stop sniffing or man in the middle attacks. On console platforms this is usually built in, but if you are on the PC you&#039;d want at least to add this yourself manually or use RakNet, OpenTNL or similar.

The other problem is that the &quot;Virtual Connection over UDP&quot; example used the IP address as the session. Instead you should generate some random guid and use that instead, I think there is a mention of this technique in the Quake 3 Network Model article by Brian Hook. It also help with esoteric NAT issues where the IP/port can get shuffled automatically (mid-connection).

Another standard thing to do which is not done here is to start with a random session id. This again provides a bit better safety against man in the middle attacks / spoofing and is a good practice anyway.

Another problem with the code is the reliability and flow control uses a very inefficient algorithm based around std::list. You can do much better with a sliding window implementation or ringbuffer. It&#039;s got much better cache behavior.

That&#039;s all I can think of. cheers</description>
		<content:encoded><![CDATA[<p>OK so the first example of not hardening is that the packets have no encryption to stop sniffing or man in the middle attacks. On console platforms this is usually built in, but if you are on the PC you&#8217;d want at least to add this yourself manually or use RakNet, OpenTNL or similar.</p>
<p>The other problem is that the &#8220;Virtual Connection over UDP&#8221; example used the IP address as the session. Instead you should generate some random guid and use that instead, I think there is a mention of this technique in the Quake 3 Network Model article by Brian Hook. It also help with esoteric NAT issues where the IP/port can get shuffled automatically (mid-connection).</p>
<p>Another standard thing to do which is not done here is to start with a random session id. This again provides a bit better safety against man in the middle attacks / spoofing and is a good practice anyway.</p>
<p>Another problem with the code is the reliability and flow control uses a very inefficient algorithm based around std::list. You can do much better with a sliding window implementation or ringbuffer. It&#8217;s got much better cache behavior.</p>
<p>That&#8217;s all I can think of. cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Wiggill</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28194</link>
		<dc:creator>Nick Wiggill</dc:creator>
		<pubDate>Sun, 11 Dec 2011 00:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28194</guid>
		<description>Hi Glenn,

As countless others have said, much respect re your superb ability to instruct others. (Your articles on timing remain the best around.)

I want to ask: You repeatedly mention that you would not consider this production ready code, and at one point you mention this approach being &quot;non-hardened&quot;. In your professional capacity, do you personally do the security work on the protocols you develop? I&#039;m writing a smaller game and so I&#039;m not too concerned with there being security breaches, so long as I can detect them, log them and fix them later.

What points would you suggest require greater security here, aside from the IP-spoofing you mentioned? Also how did you go about learning the security side -- was it mainly through trial and error? And do you think you&#039;ll ever write any articles on this aspect?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Glenn,</p>
<p>As countless others have said, much respect re your superb ability to instruct others. (Your articles on timing remain the best around.)</p>
<p>I want to ask: You repeatedly mention that you would not consider this production ready code, and at one point you mention this approach being &#8220;non-hardened&#8221;. In your professional capacity, do you personally do the security work on the protocols you develop? I&#8217;m writing a smaller game and so I&#8217;m not too concerned with there being security breaches, so long as I can detect them, log them and fix them later.</p>
<p>What points would you suggest require greater security here, aside from the IP-spoofing you mentioned? Also how did you go about learning the security side &#8212; was it mainly through trial and error? And do you think you&#8217;ll ever write any articles on this aspect?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28157</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sat, 10 Dec 2011 19:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28157</guid>
		<description>The point of this article is simply that if you detect congestion, it is best to throttle back, otherwise you risk inducing further latency and packet loss. You&#039;ll see this behavior if you run your game through a network simulator and restrict the bandwidth to say 64kbit/sec and send more than that -- routers tend to buffer up packets vs. discarding them.

Yes the interaction between TCP and UDP is extremely complicated. I just added that to the end of an article as an interesting point to consider. Hopefully people understand that yes, other traffic sent over the network can influence the behavior of your game. I&#039;m not proposing the technique described in this article as a *solution* for that particular problem of UDP vs. TCP flows.

cheers</description>
		<content:encoded><![CDATA[<p>The point of this article is simply that if you detect congestion, it is best to throttle back, otherwise you risk inducing further latency and packet loss. You&#8217;ll see this behavior if you run your game through a network simulator and restrict the bandwidth to say 64kbit/sec and send more than that &#8212; routers tend to buffer up packets vs. discarding them.</p>
<p>Yes the interaction between TCP and UDP is extremely complicated. I just added that to the end of an article as an interesting point to consider. Hopefully people understand that yes, other traffic sent over the network can influence the behavior of your game. I&#8217;m not proposing the technique described in this article as a *solution* for that particular problem of UDP vs. TCP flows.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28156</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sat, 10 Dec 2011 19:47:35 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28156</guid>
		<description>You are correct that the framerate and the packet send rate will contribute to the RTT measurement. 

You can choose to accept this RTT measurement as some sort of &quot;maximal&quot; RTT incorporating frame aliasing, or you could receive packets on a separate thread and timestamp the packets with the actual time of receive. This way you could get the network RTT without frame aliasing.

Both are actually useful, for example the frame aliased RTT is actually the best measurement about how long it takes for a packet to go to the other computer and actually get back to your game code which processes it. Network RTT is the best indicator of the actual quality of the connection.

Note that many people actually write dedicated servers that immediately reply to the packet sent, vs. sending the reply on the next frame to reduce latency even further (if the server updates at 60Hz, then you have another 16.66667 delay added to the RTT...)

cheers</description>
		<content:encoded><![CDATA[<p>You are correct that the framerate and the packet send rate will contribute to the RTT measurement. </p>
<p>You can choose to accept this RTT measurement as some sort of &#8220;maximal&#8221; RTT incorporating frame aliasing, or you could receive packets on a separate thread and timestamp the packets with the actual time of receive. This way you could get the network RTT without frame aliasing.</p>
<p>Both are actually useful, for example the frame aliased RTT is actually the best measurement about how long it takes for a packet to go to the other computer and actually get back to your game code which processes it. Network RTT is the best indicator of the actual quality of the connection.</p>
<p>Note that many people actually write dedicated servers that immediately reply to the packet sent, vs. sending the reply on the next frame to reduce latency even further (if the server updates at 60Hz, then you have another 16.66667 delay added to the RTT&#8230;)</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/#comment-28155</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sat, 10 Dec 2011 19:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/reliability-and-flow-control/#comment-28155</guid>
		<description>Good point</description>
		<content:encoded><![CDATA[<p>Good point</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.258 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-04-03 16:28:17 -->

