I have a ratchet chat server file
use Ratchet\\Server\\IoServer;
use Ratchet\\WebSocket\\WsServer;
use MyAppChat\\Chat;
require dirname(__DIR__) . \'/vendor/
If you are using Windows IIS, make sure that you have configured it for HTTPS (I'm using self signed certificate), then install reverse proxy:
URL rewrite: https://www.iis.net/downloads/microsoft/url-rewrite and ARR 3.0: https://www.iis.net/downloads/microsoft/application-request-routing
You also need to enable websockets support in IIS:
create folder (e.g. myproxyfolder) for URL rewrite, on this folder create web.config file with content:
and change "http://127.0.0.1:8080" to your websocket service (I'm using Ratched for PHP on WIN).
On client side in javascript, use secure websockets wss:// protocol, like:
mysock = new WebSocket('wss://127.0.0.1/myproxyfolder');
...