OpenSwoole\Server->listen

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

Declaration

<?php OpenSwoole\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 September 1, 2022