web_socket.php Configuration
The webCOMAND Web Socket configuration file is located at:
packages/com_webcomand/config/web_socket.php
It contains the following configuration options.
- enabled - If defined and TRUE, this will direct web clients to attempt to connect to the Web Socket Server for updates. If FALSE, webCOMAND client instances will remain disconnected and not poll the socket server for a connection (which keeps the browser console free of errors). This will not impact whether the server side web socket server will run, which is controlled by its Scheduled Task and the COMAND Daemon.
- host - The web socket host that the socket server will bind to. Default is 'localhost', which is generally correct.
- port - The web socket port that the socket server will bind to. This must match what is defined in the Apache configuration for incoming connections. Default is 8084.
- buffer - The buffer size, in bytes, that the socket server will use when reading from incoming requests. Default is 2048.
- auth_url - The web socket server will verify incoming connection requests against logged in and authenticated users. This is the fully qualified URL to verify them against, which should match the URL to the CMS. No default, which means this will need to be configured. For example, 'demo.webcomand.com'.
<?php
/**
* Defines configuration values for the webCOMAND Framework Web Socket Server, which drives how webCOMAND will behave.
*/
$config = [
// If defined and TRUE, this will direct web clients to attempt to connect to the Web Socket Server for updates. If FALSE, webCOMAND client
// instances will remain disconnected and not poll the socket server for a connection (which keeps the browser console free of errors). This
// will not impact whether the server side web socket server will run, which is controlled by its Scheduled Task and the COMAND Daemon.
'enabled' => TRUE,
// The web socket host that the socket server will bind to. 'localhost' is generally correct.
'host' => 'localhost',
// The web socket port that the socket server will bind to. This must match what is defined in the Apache configuration for incoming connections
'port' => 8084,
// The buffer size, in bytes, that the socket server will use when reading from incoming requests.
'buffer' => 2048,
// The web socket server will verify incoming connection requests against logged in and authenticated users. This is the fully qualified URL to
// verify them against, which should match the URL to the CMS.
'auth_url' => 'https://demo.webcomand.com'
];
webCOMAND config.php
Custom overrides can be configured in webcomand/config.php as:
<?php
$config = [
'com_webcomand' => [
'web_socket' => [
'auth_url' => 'https://demo.webcomand.com'
]
]
];