<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to The_Connection_Class</title><link>https://sourceforge.net/p/kdis/wiki/The_Connection_Class/</link><description>Recent changes to The_Connection_Class</description><atom:link href="https://sourceforge.net/p/kdis/wiki/The_Connection_Class/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 27 Jun 2014 12:06:06 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/kdis/wiki/The_Connection_Class/feed" rel="self" type="application/rss+xml"/><item><title>The_Connection_Class modified by Karl  Jones</title><link>https://sourceforge.net/p/kdis/wiki/The_Connection_Class/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,3 +1,5 @@
+[TOC]
+
 ## Intro

 The Connection class is a cross platform DIS centric socket class. It was introduced in version **2-1-0**. 
@@ -18,6 +20,17 @@
     #include "KDIS/Network/Connection.h"

+## Connection Subscriber
+
+    The connection subscriber is based on the [Publish/Subscriber design pattern](http://en.wikipedia.org/wiki/Publish/subscribe). 
+
+    We have 3 events we can subscribe to: 
+
+  * **OnDataReceived** is called when data is received on the network and is called before the data is decoded and turned into a PDU. We can use this event to stop the data being processed by returning false. This allows for a simple IP Filter to be implemented. 
+  * **OnPDUReceived** is called after OnDataReceived(providing true was returned). The data has now been decoded into a PDU and can be handled here. Note: By default this pointer is deleted once all OnPDUReceived event have been fired. 
+  * **OnPDUTransmit** is called when a PDU is sent using the Connection class. This event can also make changes to the PDU before it is sent, such as setting the timestamp. 
+
 ## Examples

-[PDU_Factory2] 
+    [PDU_Factory2] 
+    This example shows how the ConnectionSubscriber can be used when receiving data. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Karl  Jones</dc:creator><pubDate>Fri, 27 Jun 2014 12:06:06 -0000</pubDate><guid>https://sourceforge.net56b39a6cce3477810e7f15e083dc7a5c76f440ef</guid></item><item><title>The_Connection_Class modified by Karl  Jones</title><link>https://sourceforge.net/p/kdis/wiki/The_Connection_Class/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="intro"&gt;Intro&lt;/h2&gt;
&lt;p&gt;The Connection class is a cross platform DIS centric socket class. It was introduced in version &lt;strong&gt;2-1-0&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;The Connection class features: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Broadcast and Multicast support &lt;/li&gt;
&lt;li&gt;Blocking or None blocking mode &lt;/li&gt;
&lt;li&gt;Tested on Windows &amp;amp; Linux &lt;/li&gt;
&lt;li&gt;Support for traditional socket use(KSockets technique) and also an event method based on the &lt;a class="" href="http://en.wikipedia.org/wiki/Publish/subscribe" rel="nofollow"&gt;Publish/Subscriber design pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Support for IP address based filtering &lt;/li&gt;
&lt;li&gt;Support for custom PDU factories(Decoders). &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: The Connection class is part of a new namespace called &lt;strong&gt;NETWORK&lt;/strong&gt;. &lt;/p&gt;
&lt;h2 id="includes"&gt;Includes&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;#include &amp;quot;KDIS/Network/Connection.h&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="examples"&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a class="alink" href="/p/kdis/wiki/PDU_Factory2/"&gt;[PDU_Factory2]&lt;/a&gt; &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Karl  Jones</dc:creator><pubDate>Fri, 27 Jun 2014 12:06:06 -0000</pubDate><guid>https://sourceforge.net16c51e524fad82596bb99e1f321ae6a28e514eea</guid></item></channel></rss>