\apex\app\msgws_server

Handles the internet web socket server, and listens for messages. For more information, refer to the developer documenation.

Summary

Methods
Properties
Constants
__construct()
onOpen()
onMessage()
onClose()
onError()
No public properties found
No constants found
add_chat()
authenticate()
$clients
N/A
No private methods found
No private properties found
N/A

Properties

$clients

$clients :

Type

Methods

__construct()

__construct()

Construct

onOpen()

onOpen(\Ratchet\ConnectionInterface  $conn)

Queue a new connection to WS server

Parameters

\Ratchet\ConnectionInterface $conn

The connection that is being opened.

onMessage()

onMessage(\Ratchet\ConnectionInterface  $from,mixed  $msg)

When a message is received from the web browser to the web socket server

Parameters

\Ratchet\ConnectionInterface $from

The connection the message is from.

mixed $msg

The contents of the message.

onClose()

onClose(\Ratchet\ConnectionInterface  $conn)

on close

Parameters

\Ratchet\ConnectionInterface $conn

The connection to close.

onError()

onError(\Ratchet\ConnectionInterface  $conn,\apex\app\msg\Exception  $e)

onerror

Parameters

\Ratchet\ConnectionInterface $conn

The connection that the error is regarding.

\apex\app\msg\Exception $e

The exception that occurred.

add_chat()

add_chat(string  $line)

Add chat

Parameters

string $line

The line to add to the chat

authenticate()

authenticate(string  $auth_string,\Ratchet\ConnectionInterface  $from)

Authenticate the user

Parameters

string $auth_string

The auth string that identifies the user.

\Ratchet\ConnectionInterface $from

The connection auth request is coming from.