]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/helper/connection/class_BaseConnectionHelper.php
Added start ([[S]]) and end ([[E]]) marker for BASE64 stream
[hub.git] / application / hub / main / helper / connection / class_BaseConnectionHelper.php
index c9f1596ae9c56e1ccf6b80da805731054026aeb5..d2573681cabbc69fa7b590c2cc4286cd772ec9f8 100644 (file)
@@ -423,12 +423,15 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc
                // Deliver all data
                while ($sentBytes !== false) {
                        // And deliver it
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER: Sending out ' . strlen($encodedData) . ' bytes,MD5=' . md5($encodedData) . ',bufferSize=' . $bufferSize . ',diff=' . $this->diff);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER: Sending out ' . strlen($encodedData) . ' bytes,bufferSize=' . $bufferSize . ',diff=' . $this->diff);
+
                        if ($this->diff >= 0) {
                                // Send all out (encodedData is smaller than or equal buffer size)
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER: MD5=' . md5(substr($encodedData, 0, ($bufferSize - $this->diff))));
                                $sentBytes = socket_write($socketResource, $encodedData, ($bufferSize - $this->diff));
                        } else {
                                // Send buffer size out
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER: MD5=' . md5(substr($encodedData, 0, $bufferSize)));
                                $sentBytes = socket_write($socketResource, $encodedData, $bufferSize);
                        }