Swoole\Server->listen

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Server->listen(string $host, int $port, string $socket_type): bool

Parameters

host

The host name to use to start the server on

port

Port number for the server to listen on

socket_type

The socket type/protocol to listen on

Return

success

If success, it returns TRUE, otherwise it returns FALSE.

Description

This method is just an alias of addListener. See the addListener page for more details about this method and its usage.

Last updated on August 31, 2022