The Swoole\Server class
(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)
Introduction
Class synopsis
$timer_id
) : voidTable of Contents
- Swoole\Server::addlistener — Add a new listener to the server.
- Swoole\Server::addProcess — Add a user defined swoole_process to the server.
- Swoole\Server::after — Trigger a callback function after a period of time.
- Swoole\Server::bind — Bind the connection to a user defined user ID.
- Swoole\Server::clearTimer — Stop and destory a timer.
- Swoole\Server::close — Close a connection to the client.
- Swoole\Server::confirm — Check status of the connection.
- Swoole\Server::connection_info — Get the connection info by file description.
- Swoole\Server::connection_list — Get all of the established connections.
- Swoole\Server::__construct — Construct a Swoole server.
- Swoole\Server::defer — Delay execution of the callback function at the end of current EventLoop.
- Swoole\Server\Port::__construct — Construct a server port
- Swoole\Server\Port::__destruct — Destory server port
- Swoole\Server\Port::on — Register callback functions by event.
- Swoole\Server\Port::set — Set protocol of the server port.
- Swoole\Server::exist — Check if the connection is existed.
- Swoole\Server::finish — Used in task process for sending result to the worker process when the task is finished.
- Swoole\Server::getClientInfo — Get the connection info by file description.
- Swoole\Server::getClientList — Get all of the established connections.
- Swoole\Server::getLastError — Get the error code of the most recent error.
- Swoole\Server::heartbeat — Check all the connections on the server.
- Swoole\Server::listen — Listen on the given IP and port, socket type.
- Swoole\Server::on — Register a callback function by event name.
- Swoole\Server::pause — Stop receiving data from the connection.
- Swoole\Server::protect — Set the connection to be protected mode.
- Swoole\Server::reload — Restart all the worker process.
- Swoole\Server::resume — Start receving data from the connection.
- Swoole\Server::send — Send data to the client.
- Swoole\Server::sendfile — Send file to the connection.
- Swoole\Server::sendMessage — Send message to worker processes by ID.
- Swoole\Server::sendto — Send data to the remote UDP address.
- Swoole\Server::sendwait — Send data to the remote socket in the blocking way.
- Swoole\Server::set — Set the runtime settings of the swoole server.
- Swoole\Server::shutdown — Shutdown the master server process, this function can be called in worker processes.
- Swoole\Server::start — Start the Swoole server.
- Swoole\Server::stats — Get the stats of the Swoole server.
- Swoole\Server::stop — Stop the Swoole server.
- Swoole\Server::task — Send data to the task worker processes.
- Swoole\Server::taskwait — Send data to the task worker processes in blocking way.
- Swoole\Server::taskWaitMulti — Execute multiple tasks concurrently.
- Swoole\Server::tick — Repeats a given function at every given time-interval.
Vertaling niet beschikbaar
De PHP-handleiding is nog niet in het Nederlands vertaald, dus het scherm is in het Engels. Als u wilt, kunt u het ook in het Frans of in het Duits raadplegen.
Als je de moed voelt, kun je je vertaling aanbieden ;-)
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 30/01/2003 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/php-rf-class.swoole-server.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.