public function inheritFromRequest($req, $oldConn)
    {
        if (!$oldConn || !$req) {
            return false;
        }
        $class = $this->connectionClass;
        $conn = new $class(null, $this);
        $this->attach($conn);
        $conn->setFd($oldConn->getFd(), $oldConn->getBev());
        $oldConn->unsetFd();
        $oldConn->pool->detach($oldConn);
        $conn->onInheritanceFromRequest($req);
        if ($req instanceof \PHPDaemon\Request\Generic) {
            $req->free();
        }
        return true;
    }
public function inheritFromRequest($req, $oldConn)
    {
        if (!$oldConn || !$req) {
            return false;
        }
        $class = $this->connectionClass;
        $conn = new $class(null, $this);
        $this->attach($conn);
        $conn->setFd($oldConn->getFd(), $oldConn->getBev());
        $oldConn->unsetFd();
        $oldConn->pool->detach($oldConn);
        $conn->onInheritanceFromRequest($req);
        if ($req instanceof \PHPDaemon\Request\Generic) {
            $req->free();
        }
        return true;
    }
public function inheritFromRequest ( $ req , $ oldConn ) { if ( ! $ oldConn || ! $ req ) { return false ; } $ class = $ this -> connectionClass ; $ conn = new $ class ( null , $ this ) ; $ this -> attach ( $ conn ) ; $ conn -> setFd ( $ oldConn -> getFd ( ) , $ oldConn -> getBev ( ) ) ; $ oldConn -> unsetFd ( ) ; $ oldConn -> pool -> detach ( $ oldConn ) ; $ conn -> onInheritanceFromRequest ( $ req ) ; if ( $ req instanceof \ PHPDaemon \ Request \ Generic ) { $ req -> free ( ) ; } return true ; }
Called when a request to HTTP-server looks like another connection
@param  object $req Request
@param  object $oldConn Connection
@return boolean Success
Called when a request to HTTP - server looks like another connection