Skip to content

WebSockets\Server

AlMA PRO LEADER edited this page Oct 19, 2018 · 3 revisions

WebSockets\Server Class

This class uses:
\Ratchet\Server\IoServer
\Ratchet\Http\HttpServer
\Ratchet\WebSocket\WsServer
to create a WebSockets server.

Functions

init

This function initiates the WebSockets server.
It accepts a required argument which is the server port, and an optional argument which is the binding address.
By default, the binding address is 127.0.0.1.

run

This function runs the WebSockets server after it's been initialized.

Examples

Clone this wiki locally