\WsAppHandler

Summary

Methods
Properties
Constants
__construct()
onMessageRecieved()
onClientConnected()
onClientDisconnected()
onLogMessage()
on()
$appNames
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$app
N/A

Properties

$appNames

$appNames : array<mixed,string>

Type

array<mixed,string>

$app

$app : array

+ message + connect + disconnect + log

Type

array

Methods

__construct()

__construct() 

onMessageRecieved()

onMessageRecieved(\PHP\WebSocket\SocketServer  $server, \PHP\WebSocket\SocketClient  $sender, string  $message) 

Called when a client sends a message to the server.

Parameters

\PHP\WebSocket\SocketServer $server

The server instance

\PHP\WebSocket\SocketClient $sender
string $message

Sent message

onClientConnected()

onClientConnected(\PHP\WebSocket\SocketServer  $server, \PHP\WebSocket\SocketClient  $client) 

Called when a new client connects to the server.

Parameters

\PHP\WebSocket\SocketServer $server

The server instance

\PHP\WebSocket\SocketClient $client

Client that connected

onClientDisconnected()

onClientDisconnected(\PHP\WebSocket\SocketServer  $server, \PHP\WebSocket\SocketClient  $client) 

Called when a client disconnects from the server.

Parameters

\PHP\WebSocket\SocketServer $server

The server instance

\PHP\WebSocket\SocketClient $client

Client that disconnected

onLogMessage()

onLogMessage(\PHP\WebSocket\SocketServer  $server, string  $message) 

Called when the server generates a log message.

Parameters

\PHP\WebSocket\SocketServer $server

The server

string $message

Log message

on()

on(  $name,   $handler) : \WsAppHandler

+ message(PHP\WebSocket\SocketServer, PHP\WebSocket\SocketClient, $message) + connect(PHP\WebSocket\SocketServer, PHP\WebSocket\SocketClient) + disconnect(PHP\WebSocket\SocketServer, PHP\WebSocket\SocketClient) + log(PHP\WebSocket\SocketServer, $message)

Parameters

$name
$handler

Returns

\WsAppHandler