Swoole\Server->listen

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.