]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php
Rewrites, some more methods:
[hub.git] / application / hub / main / template / answer / announcement / class_XmlAnnouncementAnswerTemplateEngine.php
index 5245f5a329068f3b69a168b034fbf687e7123af5..17feefd456b20ee14dad667ee2f53b4857260e0b 100644 (file)
@@ -30,8 +30,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
        const ANNOUNCEMENT_DATA_NODE_STATUS   = 'my-status';
        const ANNOUNCEMENT_DATA_EXTERNAL_IP   = 'my-external-ip';
        const ANNOUNCEMENT_DATA_INTERNAL_IP   = 'my-internal-ip';
-       const ANNOUNCEMENT_DATA_TCP_PORT      = 'my-tcp-port';
-       const ANNOUNCEMENT_DATA_UDP_PORT      = 'my-udp-port';
+       const ANNOUNCEMENT_DATA_LISTEN_PORT      = 'my-listen-port';
 
        /**
         * Protected constructor
@@ -50,8 +49,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                        // Data from *this* node
                        self::ANNOUNCEMENT_DATA_EXTERNAL_IP,
                        self::ANNOUNCEMENT_DATA_INTERNAL_IP,
-                       self::ANNOUNCEMENT_DATA_TCP_PORT,
-                       self::ANNOUNCEMENT_DATA_UDP_PORT,
+                       self::ANNOUNCEMENT_DATA_LISTEN_PORT,
                        self::ANNOUNCEMENT_DATA_NODE_STATUS,
                        self::ANNOUNCEMENT_DATA_SESSION_ID,
                        // Data from other node
@@ -164,19 +162,9 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
         *
         * @return      void
         */
-       protected function startMyTcpPort () {
+       protected function startMyListenPort () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_TCP_PORT);
-       }
-
-       /**
-        * Starts the my-udp-port
-        *
-        * @return      void
-        */
-       protected function startMyUdpPort () {
-               // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_UDP_PORT);
+               $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_LISTEN_PORT);
        }
 
        /**
@@ -219,22 +207,12 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                $this->getStackerInstance()->popNamed('node_announcement_answer');
        }
 
-       /**
-        * Finishes the my-udp-port
-        *
-        * @return      void
-        */
-       protected function finishMyUdpPort () {
-               // Pop the last entry
-               $this->getStackerInstance()->popNamed('node_announcement_answer');
-       }
-
        /**
         * Finishes the my-tcp-port
         *
         * @return      void
         */
-       protected function finishMyTcpPort () {
+       protected function finishMyListenPort () {
                // Pop the last entry
                $this->getStackerInstance()->popNamed('node_announcement_answer');
        }