From: Roland Häder Date: Fri, 21 Aug 2009 17:44:34 +0000 (+0000) Subject: Web output instance added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c2c103ba61ec1462e2ef69a3f144ecfe6aeb4ebd;p=hub.git Web output instance added --- diff --git a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php index f2544adcd..c42684b1f 100644 --- a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php +++ b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php @@ -70,8 +70,11 @@ class TcpNetworkPackageHandler extends BaseNetworkPackageHandler implements Netw // Reset error code to unhandled $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED); + // Debug message + $this->debugOutput('HANDLER: Handling TCP package from client ' . $resource); + // Read the raw data from socket - $rawData = socket_read($resource, 1500, PHP_BINARY_READ); + $rawData = socket_read($resource, 1500, PHP_NORMAL_READ); // Is it valid? if (($rawData === false) || (socket_last_error($resource) > 0)) { diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index 8002d4a09..9773fc871 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -185,6 +185,9 @@ class TcpListener extends BaseListener implements Listenable { // Then accept it $newSocket = socket_accept($this->getSocketResource()); + // Debug message + $this->debugOutput('LISTENER: Adding new client: ' . $newSocket); + // Add it to the clients $this->getPoolInstance()->addClient($newSocket); } // END - if