Join 4,000+ others and never miss out on new tips, tutorials, and more.
4.x is outdated, please check the latest version 22.x
Latest version:
pecl install openswoole-22.1.2
<?php Swoole\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.