Cannot Connect Using domain other than localhost
Xampp is controlling my local virtual host here for testing. I am trying to get ratchet to work and create a web server correctly. The problem is that the system isn't responding when I tell the system to go to the web socket host address in JS.

I know I want that address to be equal to whatever the current address is. I will be putting that in the request so that JS will know what it is, but for now lets say it local.ezbusinessmanager.com as the base domain, and I am setting the port of the web socket server to 8080. I have the following doing that in a command object called ChatServerCommand.

```php
/**
 * Implement this method with your command's logic.
 * This starts the socket server.
 * Throws random warnings and errors most of the time on purpose.
 * If it makes it all the way through, you win!
 *
 * @param Arguments $args The command arguments.
 * @param ConsoleIo $io The console io
 * @return void The exit code or null for success
 */
public function execute(Arguments $args, ConsoleIo $io): void
{
    $port = $args->getArgument('port') ? intval($args->getArgument('port')) : 8080;
    $domain = Configure::read('App.fullBaseUrl') !== "localhost" ? Configure::read('App.fullBaseUrl') : 'local.ezbusinessmanager.com';
    $this->prepareDomain($domain);
    $io->success("Socket server now running on ws://$domain:$port");
    $server = new App($domain, $port);
    $server->route($domain, new Chat(), ['*']);
    $server->run();
}

/**
 * Remove http, https, www, and slashes from domain string.
 *
 * @param string $domain Domain to be prepared.
 */
public function prepareDomain(string &$domain): void
{
    // If URI is like, eg. www.way2tutorial.com/
    $domain = trim($domain, '/');

    // If not have http:// or https:// then prepend it
    if (!preg_match('#^http(s)?://#', $domain)) {
        $domain = 'http://' . $domain;
    }

    $urlParts = parse_url($domain);

    // Remove www.
    $domain = preg_replace('/^www\./', '', $urlParts['host']);
}
```

It seems to run when I call the command, but when I get to my page, it tells me that it can't connect Its not getting to the server because that Chat() object should be sending a log error if there is something on the back end at all.

I am calling it with this script

```javscript
"use strict";

const conn = new WebSocket('ws://local.ezbusinessmanager.com:8080');
conn.onopen = () => {
    console.log('connected to server...');
};
conn.onerror = e => {
    console.error('An error has occurred:', e.type);
};
```