]> git.mxchange.org Git - hub.git/commitdiff
Stub method initListener() added
authorRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 19:17:15 +0000 (19:17 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 7 Jul 2009 19:17:15 +0000 (19:17 +0000)
application/hub/interfaces/listener/class_Listenable.php
application/hub/main/listener/class_
application/hub/main/listener/tcp/class_TcpListener.php
application/hub/main/listener/udp/class_UdpListener.php
application/hub/main/nodes/class_BaseHubNode.php

index 2d5b8c5d7ba6a307902031471851bc587f4f2538..ede2b555fe56d23b9265718ba28f38158bc8067f 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Listenable extends FrameworkInterface {
+       /**
+        * Initializes the listener by setting up the required socket server
+        *
+        * @return      void
+        */
+       function initListener();
 }
 
 //
index 155249e515e30a471771f149aa0eeb656e878eb4..0cb39a6e6cdcc41c0d5282bb792ad883b106e94f 100644 (file)
@@ -48,6 +48,16 @@ class ???Listener extends BaseListener implements Listenable {
                // Return the prepared instance
                return $listenerInstance;
        }
+
+       /**
+        * Initializes the listener by setting up the required socket server
+        *
+        * @return      void
+        * @todo        0% done
+        */
+       public function initListener() {
+               $this->partialStub('Need to implement this method.');
+       }
 }
 
 // [EOF]
index dc6a8a90718158a917233f75b1a986318b36ccfd..ea227ce7faf07184327862d706fd83545e847c8b 100644 (file)
@@ -48,6 +48,15 @@ class TcpListener extends BaseListener implements Listenable {
                // Return the prepared instance
                return $listenerInstance;
        }
+
+       /**
+        * Initializes the listener by setting up the required socket server
+        *
+        * @return      void
+        */
+       public function initListener() {
+               $this->partialStub('Need to implement this method.');
+       }
 }
 
 // [EOF]
index 4bef4eb068494647cdb6ee2e05ac03ffc8dfc292..b3b25b866e30e03259d4a4d81ed28c60fae17bae 100644 (file)
@@ -48,6 +48,15 @@ class UdpListener extends BaseListener implements Listenable {
                // Return the prepared instance
                return $listenerInstance;
        }
+
+       /**
+        * Initializes the listener by setting up the required socket server
+        *
+        * @return      void
+        */
+       public function initListener() {
+               $this->partialStub('Need to implement this method.');
+       }
 }
 
 // [EOF]
index 77c80e084f97e909ef22fd3fee1f42cdb15205b4..db16c7742a68ee00c08dbba96b72aad137ff8758 100644 (file)
@@ -340,12 +340,18 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
                $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port');
 
+               // Initialize the listener
+               $listenerInstance->initListener();
+
                // Initialize the UDP listener
                $listenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this));
 
                // Setup address and port
                $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
                $listenerInstance->setListenPortByConfiguration('node_udp_listen_port');
+
+               // Initialize the listener
+               $listenerInstance->initListener();
        }
 }