OpenSwoole\Coroutine\Server->start()

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

Declaration

<?php OpenSwoole\Coroutine\Server->start(): bool

Parameters

None

Return

If starting the server is successful it will enter the event loop and begin accepting connections and processing requests. If something went wrong or there is an error, false is returned. Check $server->errCode for more details.


Description

Startup the coroutine server and begin processing new connections, using the handle callback function. For each new request a coroutine is created and the callback handle function is executed inside that coroutine.

If you receive errors related to Too many open files the server will wait at least 1 second before trying to create another coroutine.


Last updated on September 1, 2022