]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/class_BaseHubSystem.php
Publication of DHT entries requires a fully booted DHT as else it will only find...
[hub.git] / application / hub / main / class_BaseHubSystem.php
index 6d34489d6321b371faf8894690769f5e4f19520c..a14384e1cfa5d9db6e036d168645a412dedb38c5 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A general hub system class
  *
- * @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
  * @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
@@ -31,6 +31,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
        const EXCEPTION_BASE64_ENCODING_NOT_MODULO_4  = 0x905;
        const EXCEPTION_NODE_SESSION_ID_NOT_VERIFYING = 0x906;
        const EXCEPTION_REQUEST_NOT_ACCEPTED          = 0x907;
+       const SOCKET_ERROR_CONNECTION_RESET_BY_PEER   = 0x908;
 
        // Message status codes
        const MESSAGE_STATUS_CODE_OKAY = 'OKAY';
@@ -452,7 +453,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
                $chunkSplits = explode(PackageFragmenter::CHUNK_DATA_HASH_SEPARATOR, $chunks[count($chunks) - 1]);
 
                // Make sure chunks with only 3 elements are parsed (for details see ChunkHandler)
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, true));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, TRUE));
                assert(count($chunkSplits) == 3);
 
                // Validate final chunk
@@ -488,6 +489,10 @@ class BaseHubSystem extends BaseFrameworkSystem {
                                $errorName = BaseRawDataHandler::SOCKET_ERROR_RESOURCE_UNAVAILABLE;
                                break;
 
+                       case 104: // "Connection reset by peer"
+                               $errorName = BaseRawDataHandler::SOCKET_ERROR_CONNECTION_RESET_BY_PEER;
+                               break;
+
                        case 107: // "Transport end-point not connected"
                        case 134: // On some (?) systems for 'transport end-point not connected'
                                // @TODO On some systems it is 134, on some 107?