Join 4,000+ others and never miss out on new tips, tutorials, and more.
pecl install openswoole-22.0.0 | composer require openswoole/core:22.1.2
<?php OpenSwoole\Server->listen(string $host, int $port, string $socket_type): bool
The host name to use to start the server on
Port number for the server to listen on
The socket type/protocol to listen on
If success, it returns TRUE, otherwise it returns FALSE.
This method is just an alias of addListener. See the
addListener page for more details about this method and its usage.