]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/recipient/self/class_SelfRecipient.php
Added more UNL (Universal Node Locator) stuff:
[hub.git] / application / hub / main / recipient / self / class_SelfRecipient.php
index 10c0bb1f0469da525c290c33ba5f84536d34c468..85d29eab85b3a1e13598497075d278db4a7d0361 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A Self recipient
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,17 +46,20 @@ class SelfRecipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
         * @param       $listInstance   An instance of a Listable class
+        * @param       $packageData    Valid package data array
         * @return      $resolved               Resolved recipient or VOID if only the set list has been filled
         * @throws      FrameworkException      Could throw different exceptions depending on implementation
         */
-       public function resolveRecipient ($recipient, Listable $listInstance) {
+       public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Make sure the recipient is valid
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
+               // @TODO Unfinished
+               die(__METHOD__ . 'recipient=:' . print_r($recipient, TRUE));
                assert($recipient == NetworkPackage::NETWORK_TARGET_SELF);
 
                // Determine own port
@@ -68,7 +71,7 @@ class SelfRecipient extends BaseRecipient implements Recipient {
                // Is it not empty?
                if (!empty($ip)) {
                        // Add it to the list
-                       $listInstance->addEntry('ip_port', $ip . ':' . $port);
+                       $listInstance->addEntry('unl', $ip . ':' . $port);
                } // END - if
        }
 }