protected function createSocket()
    {
        $now = $this->getCurrentTime();
        if ($this->retryTime === null) {
            $attempt = true;
        } else {
            $attempt = ($now >= $this->retryTime);
        }

        if (!$attempt) {
            return;
        }

        $this->socket = $this->makeSocket();
        if ($this->socket !== false) {
            $this->retryTime = null;
            return;
        }

        if ($this->retryTime === null) {
            $this->retryPeriod = $this->retryStart;
        } else {
            $this->retryPeriod *= $this->retryFactor;
            if ($this->retryPeriod > $this->retryMax) {
                $this->retryPeriod = $this->retryMax;
            }
        }
        $this->retryTime = $now + $this->retryPeriod;
    }
protected function createSocket()
    {
        $now = $this->getCurrentTime();
        if ($this->retryTime === null) {
            $attempt = true;
        } else {
            $attempt = ($now >= $this->retryTime);
        }

        if (!$attempt) {
            return;
        }

        $this->socket = $this->makeSocket();
        if ($this->socket !== false) {
            $this->retryTime = null;
            return;
        }

        if ($this->retryTime === null) {
            $this->retryPeriod = $this->retryStart;
        } else {
            $this->retryPeriod *= $this->retryFactor;
            if ($this->retryPeriod > $this->retryMax) {
                $this->retryPeriod = $this->retryMax;
            }
        }
        $this->retryTime = $now + $this->retryPeriod;
    }
protected function createSocket ( ) { $ now = $ this -> getCurrentTime ( ) ; if ( $ this -> retryTime === null ) { $ attempt = true ; } else { $ attempt = ( $ now >= $ this -> retryTime ) ; } if ( ! $ attempt ) { return ; } $ this -> socket = $ this -> makeSocket ( ) ; if ( $ this -> socket !== false ) { $ this -> retryTime = null ; return ; } if ( $ this -> retryTime === null ) { $ this -> retryPeriod = $ this -> retryStart ; } else { $ this -> retryPeriod *= $ this -> retryFactor ; if ( $ this -> retryPeriod > $ this -> retryMax ) { $ this -> retryPeriod = $ this -> retryMax ; } } $ this -> retryTime = $ now + $ this -> retryPeriod ; }
Create a new socket, taking into account
things like retry attempts and delays.

\return
This method does not return any value.
Create a new socket taking into account things like retry attempts and delays .