Allow browsers that don't natively support WebSockets to connect to your Ratchet app with Flash Sockets.
In your HTML include the JavaScript library web-socket-js, which is a client-side polyfill for the WebSocket API.
In order for Flash to communicate with a server through sockets, it must first gain permission via an XML response on the 843 port. Flash will make this request automatically before it connects to your WebSocket application server.
This means you need to run two shell scripts; one on port 843 wit FlashPolicy and one on port 80 for your application.
Note: This component is bundled within the App class. It assumes port 843 if you're running on port 80 and 8843 if otherwise (proxy forwarding).
None
<?php // Your shell script use Ratchet\Server\FlashPolicy; use Ratchet\Server\IoServer; $flash = new FlashPolicy; $flash->addAllowedAccess('*', 8080); // Allow all Flash Sockets from any domain to connect on port 8080 $server = IoServer::factory($flash, 843); $server->run();