]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/helper/connection/class_BaseConnectionHelper.php
Refacturing to pass a ProtocolHandler instance instead of the direct name. This
[hub.git] / application / hub / main / helper / connection / class_BaseConnectionHelper.php
index eede0f8f3a9800eb0104794bd47849be2254d15c..328eb03309277a1adede873b7f338d38d10c3a1d 100644 (file)
@@ -40,11 +40,6 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
         */
        const CONNECTION_TYPE_SERVER   = 'server';
 
-       /**
-        * Protocol used
-        */
-       private $protocol = 'invalid';
-
        /**
         * Port number used
         */
@@ -147,25 +142,6 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                $this->port = $port;
        }
 
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       public final function getProtocol () {
-               return $this->protocol;
-       }
-
-       /**
-        * Setter for protocol
-        *
-        * @param       $protocol       Used protocol
-        * @return      void
-        */
-       protected final function setProtocol ($protocol) {
-               $this->protocol = $protocol;
-       }
-
        /**
         * Getter for IP address
         *
@@ -413,7 +389,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                assert(strlen($rawData) > 0);
 
                // Calculate buffer size
-               $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocol() . '_buffer_length');
+               $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
 
                // Encode the raw data with our output-stream
                $encodedData = $this->getOutputStreamInstance()->streamData($rawData);