<?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: Virtual Connection over UDP</title>
	<atom:link href="http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/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, 20 Mar 2012 18:51:49 +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/virtual-connection-over-udp/#comment-39659</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Wed, 29 Feb 2012 07:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-39659</guid>
		<description>You need to ensure that the server only sends packets to the client IP/port after the client has already sent packets to the server IP. otherwise, your firewall will freak out and think the server is initiating the connection with the client and block it.

also, if you are establishing a P2P mesh (not client/server) then you will need to do NAT punchthrough.

cheers</description>
		<content:encoded><![CDATA[<p>You need to ensure that the server only sends packets to the client IP/port after the client has already sent packets to the server IP. otherwise, your firewall will freak out and think the server is initiating the connection with the client and block it.</p>
<p>also, if you are establishing a P2P mesh (not client/server) then you will need to do NAT punchthrough.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harley</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-39055</link>
		<dc:creator>Harley</dc:creator>
		<pubDate>Thu, 23 Feb 2012 16:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-39055</guid>
		<description>Hey Glen, Great job on the tutorials, I love them!

I am however having a problems connecting from one computer to another. Say if I have one computer running as the server, i.e. it is just listening for a client, and I then get its IP address by looking up &quot;what is my ip&quot; on google. Can I then just go onto another computer which is connected to the internet and connect as a client by setting the connection address to the IP (eg set &quot;connection.Connect( Address(XXX,XXX,XXX,XXX,ServerPort ) );&quot; where X is the other computers IP)?</description>
		<content:encoded><![CDATA[<p>Hey Glen, Great job on the tutorials, I love them!</p>
<p>I am however having a problems connecting from one computer to another. Say if I have one computer running as the server, i.e. it is just listening for a client, and I then get its IP address by looking up &#8220;what is my ip&#8221; on google. Can I then just go onto another computer which is connected to the internet and connect as a client by setting the connection address to the IP (eg set &#8220;connection.Connect( Address(XXX,XXX,XXX,XXX,ServerPort ) );&#8221; where X is the other computers IP)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-28010</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 09 Dec 2011 19:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-28010</guid>
		<description>I think eventually I&#039;ll leave these original articles online but sell an ebook for the rest of the articles that I&#039;ll write over the next ten years (hopefully a full books&#039; worth...) with updated example source code under BSD licence.</description>
		<content:encoded><![CDATA[<p>I think eventually I&#8217;ll leave these original articles online but sell an ebook for the rest of the articles that I&#8217;ll write over the next ten years (hopefully a full books&#8217; worth&#8230;) with updated example source code under BSD licence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-28009</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 09 Dec 2011 19:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-28009</guid>
		<description>I would eventually like to write a book on networking, once work calms down a bit (if it ever does), I&#039;d like to take all my GDC talks and articles and combine it into a e-book. I think I&#039;ll maybe kickstarter it.</description>
		<content:encoded><![CDATA[<p>I would eventually like to write a book on networking, once work calms down a bit (if it ever does), I&#8217;d like to take all my GDC talks and articles and combine it into a e-book. I think I&#8217;ll maybe kickstarter it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-5632</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Sun, 12 Dec 2010 16:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-5632</guid>
		<description>actually it will work provided the server (the one being connected to) is not behind NAT. if you need to establish P2P connections then you&#039;ll need to use NAT-punchthrough. cheers</description>
		<content:encoded><![CDATA[<p>actually it will work provided the server (the one being connected to) is not behind NAT. if you need to establish P2P connections then you&#8217;ll need to use NAT-punchthrough. cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The-Snake</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-5563</link>
		<dc:creator>The-Snake</dc:creator>
		<pubDate>Fri, 10 Dec 2010 20:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-5563</guid>
		<description>Well... this isn&#039;t a connection over udp...
This won&#039;t work unless the client is directly connected to the Internet... right ?

I mean, if all you have is an IP and a port, the server will send answers to the device who sent the packages... which is your client ONLY when you&#039;re not using a router (and almost everybody use routers nowadays).

When using a TCP connection, you don&#039;t have such problems (you still can&#039;t connect to a device which is not directly connected to the Internet, unless the router makes a redirection)... using UDP is a whole other matter.
I am actually wondering how games such as Warcraft III deal with that stuff : why is the server the ONLY ONE who has to be directly connected to Internet (or have his router re-route packages from one port to him) ?</description>
		<content:encoded><![CDATA[<p>Well&#8230; this isn&#8217;t a connection over udp&#8230;<br />
This won&#8217;t work unless the client is directly connected to the Internet&#8230; right ?</p>
<p>I mean, if all you have is an IP and a port, the server will send answers to the device who sent the packages&#8230; which is your client ONLY when you&#8217;re not using a router (and almost everybody use routers nowadays).</p>
<p>When using a TCP connection, you don&#8217;t have such problems (you still can&#8217;t connect to a device which is not directly connected to the Internet, unless the router makes a redirection)&#8230; using UDP is a whole other matter.<br />
I am actually wondering how games such as Warcraft III deal with that stuff : why is the server the ONLY ONE who has to be directly connected to Internet (or have his router re-route packages from one port to him) ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr.Kappa</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-903</link>
		<dc:creator>Dr.Kappa</dc:creator>
		<pubDate>Thu, 03 Jun 2010 08:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-903</guid>
		<description>Yes you&#039;re right... and deallocation is automatic. ;)</description>
		<content:encoded><![CDATA[<p>Yes you&#8217;re right&#8230; and deallocation is automatic. <img src='http://gafferongames.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-902</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Wed, 02 Jun 2010 20:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-902</guid>
		<description>for such a small allocation, it&#039;s better to allocate on the stack via alloca, at least where I come from working on game consoles ;)</description>
		<content:encoded><![CDATA[<p>for such a small allocation, it&#8217;s better to allocate on the stack via alloca, at least where I come from working on game consoles <img src='http://gafferongames.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr.Kappa</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-901</link>
		<dc:creator>Dr.Kappa</dc:creator>
		<pubDate>Wed, 02 Jun 2010 13:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-901</guid>
		<description>You don&#039;t need a pointer-to-pointer since:

unsigned char *packet;
packet = new unsigned char[size+4];

should be enough... the rest of code is pretty much the same.</description>
		<content:encoded><![CDATA[<p>You don&#8217;t need a pointer-to-pointer since:</p>
<p>unsigned char *packet;<br />
packet = new unsigned char[size+4];</p>
<p>should be enough&#8230; the rest of code is pretty much the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Cubells</title>
		<link>http://gafferongames.com/networking-for-game-programmers/virtual-connection-over-udp/#comment-900</link>
		<dc:creator>Christopher Cubells</dc:creator>
		<pubDate>Sun, 17 Jan 2010 17:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://gafferongames.wordpress.com/?page_id=130#comment-900</guid>
		<description>When using Visual Studio Express 2010 Beta 2 to compile your example Client/Server code, there is an issue with the dynamic packet array in the Net.h header file.

unsigned char packet[size+4];

needs to be changed to:

unsigned char **packet;
packet = new unsigned char*[size+4];

and in the if statement below the cast of (unsigned char) needs to be changed to (unsigned char*)

These changes need to be applied to both ReceivePacket and SendPacket functions.</description>
		<content:encoded><![CDATA[<p>When using Visual Studio Express 2010 Beta 2 to compile your example Client/Server code, there is an issue with the dynamic packet array in the Net.h header file.</p>
<p>unsigned char packet[size+4];</p>
<p>needs to be changed to:</p>
<p>unsigned char **packet;<br />
packet = new unsigned char*[size+4];</p>
<p>and in the if statement below the cast of (unsigned char) needs to be changed to (unsigned char*)</p>
<p>These changes need to be applied to both ReceivePacket and SendPacket functions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.259 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-03-22 22:01:55 -->

