Resume accept new connections.

@return void
343338
public function resumeAccept()
    {
        // Register a listener to be notified when server socket is ready to read.
        if (static::$globalEvent && true === $this->_pauseAccept && $this->_mainSocket) {
            if ($this->transport !== 'udp') {
                static::$globalEvent->add($this->_mainSocket, EventInterface::EV_READ, array($this, 'acceptConnection'));
            } else {
                static::$globalEvent->add($this->_mainSocket, EventInterface::EV_READ, array($this, 'acceptUdpConnection'));
            }
            $this->_pauseAccept = false;
        }
    }
1161363
function resume() {
        $this->paused = false;
        
        if($this->started && !$this->closed) {
            $this->driver->resumeStreamConsumption();
        }
    }
229791
def reconnect(self):
        
        # This is the old connection IOLoop instance, stop its ioloop
        self._connection.ioloop.stop()

        if not self._closing:
            # Create a new connection
            self._connection = self.connect()
            # There is now a new connection, needs a new ioloop to run
            self._connection.ioloop.start()
329027
public function resumeRecv()
    {
        if ($this->_isPaused === true) {
            Worker::$globalEvent->add($this->_socket, EventInterface::EV_READ, array($this, 'baseRead'));
            $this->_isPaused = false;
            $this->baseRead($this->_socket, false);
        }
    }
665372
private function connect()
    {
        $headers = [];
        if ($this->lastId) {
            $headers['Last-Event-ID'] = $this->lastId;
        }

        $this->response = $this->client->request('GET', $this->url, [
            'stream' => true,
            'headers' => $headers,
        ]);

        if ($this->response->getStatusCode() == 204) {
            throw new RuntimeException('Server forbid connection retry by responding 204 status code.');
        }
    }
629591
function resume() {
  this._paused = false;
  if(this.client._qbuf.length) {
    this.data(this.client._qbuf);
    this.client._qbuf = new Buffer(0);
  }
}
1000700
protected function onStart()
    {
        do {
            // Disconnect and reconnect
            $this->reconnect();

            // If we successfully connected and we're supposed to be running,
            // call the onConnect event
            if ($this->_conn && ! feof($this->_conn) && $this->_state == parent::STATE_RUNNING) {
                $this->onConnect();
            }

            // Params for stream_select
            $read = array($this->_conn);
            $write = null;
            $except = null;

            $buf = '';

            // Loop while the connection is valid using stream_select with a
            // timeout. The timeout allows us to check to see if a stop has been
            // requested.
            while ($this->_conn && ! feof($this->_conn) &&
                ($count = stream_select($read, $write, $except, $this->_read_timeout))) {
                // Only continue if we're in the right state
                if ($this->_state != parent::STATE_RUNNING) {
                    break;
                }

                if (! $count) {
                    // Nothing waiting, listen again
                    continue;
                }

                // Set the stream as blocking
                stream_set_blocking($this->_conn, 1);
                stream_set_timeout($this->_conn, $this->_stream_timeout);

                // Get the chunk length
                $len = fgets($this->_conn, $this->_max_line_length);
                if ($len === false) {
                    // EOF
                    continue;
                }

                // Read and process each line
                while ($this->_state == parent::STATE_RUNNING &&
                    ($line = fgets($this->_conn, $this->_max_line_length)) !== false) {
                    if (strlen($line) == 0) {
                        // End of the chunk
                        break;
                    }

                    $this->onData($line);
                }

                // Set the stream as non-blocking
                if ($this->_conn) {
                    stream_set_blocking($this->_conn, 0);
                }
            }

            $this->onDisconnect();
        } while ($this->_conn && (! feof($this->_conn) || $this->_auto_reconnect) &&
            $this->_state == parent::STATE_RUNNING);

        // Make sure we're properly disconnected and in a known state
        $this->disconnect();

        // We've stopped for some reason, figure out why
        if ($this->_state == parent::STATE_STOPPING) {
            $reason = 'Stop requested';
        } else {
            $reason = 'Connection dropped';
        }

        // Now tell the user
        $this->onStop($reason);
    }
70484
public function resume()
    {
        if (!$this->paused) { return $this; }
        $this->input->resume();
        $this->paused = false;
        $this->emit('resume');
        return $this;
    }
1048599
private function reconnect()
    {
        if (0 === (int) $this->getOption(self::OPT_MAX_RECONNECT_ATTEMPTS)) {
            throw new MaxConnectAttempsException("Connection lost.");
        } elseif ($this->reconnectAttempts === (int) $this->getOption(self::OPT_MAX_RECONNECT_ATTEMPTS)) {
            throw new MaxConnectAttempsException("Max attempts to connect to database has been reached.");
        }

        if (null === $this->credentials) {
            throw new AccessDeniedException("Unable to reconnect: credentials not provided.");
        }

        try {
            if (0 !== $this->reconnectAttempts) {
                usleep((int) $this->getOption(self::OPT_USLEEP_AFTER_FIRST_ATTEMPT));
            }
            $this->cnx = self::createLink($this->getCredentials(), $this->options);
            if ($this->isConnected()) {
                $this->reconnectAttempts = 0;
            } else {
                $this->reconnect();
            }
        } catch (Throwable $e) {
            $this->reconnectAttempts++;
        }
    }
1047207
public void resume() {
        this.paused = false;
        ServerActivityCallback listener = listenerUpdater.get(this);
        if (listener != null) {
            listenerUpdater.compareAndSet(this, listener, null);
        }
    }
1322103
public function doReconnect() {
		if(!$this->is_server) {
			$this->log->log("Reconnecting ($this->reconnectTimeout)...",  Net_XMPP_XMPPHP_Log::LEVEL_WARNING);
			$this->connect($this->reconnectTimeout, false, false);
			$this->reset();
			$this->event('reconnect');
		}
	}
155654
private function resume()
    {
        $newChangeStream = call_user_func($this->resumeCallable, $this->resumeToken);
        $this->csIt = $newChangeStream->csIt;
        $this->csIt->rewind();
    }
1212884
public function connect() {
		if (URequest::isPost ()) {
			if ($connected = $this->_connect ()) {
				if (isset ( $_POST ["ck-remember"] )) {
					$this->rememberMe ( $connected );
				}
				if (USession::exists ( $this->_attemptsSessionKey )) {
					USession::delete ( $this->_attemptsSessionKey );
				}
				$this->onConnect ( $connected );
			} else {
				$this->onBadCreditentials ();
			}
		}
	}
836301
protected function reconnect()
    {
        if ($this->connection->inTransaction()) {
            // It is not safe to blindly reconnect in the middle of a transaction
            return false;
        }

        try {
            // Make sure we free any resources associated with the old connection
            $this->connection->disconnect();
        } catch (Exception $e) {
        }

        try {
            $this->connection->connect();
            $this->connection->log('[RECONNECT]');

            return true;
        } catch (Exception $e) {
            // If there was an error connecting again, don't report it back,
            // let the retry handler do it.
            return false;
        }
    }
437816
public function stopConnection()
    {
        $this->connections[$this->counterConnections]['time'] = (time() + microtime(true) - $this->timer);
        $this->counterConnections++;
        $this->timer = 0;
    }
431175
private function acceptConnection(): void
    {
        $clientSocket = @stream_socket_accept($this->serverSocket);

        if (false !== $clientSocket) {
            stream_set_blocking($clientSocket, false);

            $connection = new StreamSocketConnection($clientSocket);

            $id = spl_object_hash($connection);

            $this->clientSockets[$id] = $clientSocket;
            $this->connections[$id]   = $connection;
        }
    }
217120
private function disconnect()
    {
        if (is_resource($this->_conn)) {
            fclose($this->_conn);
        }
        $this->_auto_reconnect = false;
        $this->_conn = null;
    }