ratchet

php ratchet websocket SSL connect?

邮差的信 提交于 2019-11-26 17:30:15
I have a ratchet chat server file use Ratchet\Server\IoServer; use Ratchet\WebSocket\WsServer; use MyAppChat\Chat; require dirname(__DIR__) . '/vendor/autoload.php'; $server = IoServer::factory( new WsServer( new Chat() ) , 26666 ); $server->run(); I using Websocket to connect with ws and it works fine if ("WebSocket" in window) { var ws = new WebSocket("ws://ratchet.mydomain.org:8888"); ws.onopen = function() { // Web Socket is connected. You can send data by send() method. ws.send("message to send"); }; ws.onmessage = function (evt) { var received_msg = evt.data; }; ws.onclose = function() {

php ratchet websocket SSL connect?

自闭症网瘾萝莉.ら 提交于 2019-11-26 05:27:52
问题 I have a ratchet chat server file use Ratchet\\Server\\IoServer; use Ratchet\\WebSocket\\WsServer; use MyAppChat\\Chat; require dirname(__DIR__) . \'/vendor/autoload.php\'; $server = IoServer::factory( new WsServer( new Chat() ) , 26666 ); $server->run(); I using Websocket to connect with ws and it works fine if (\"WebSocket\" in window) { var ws = new WebSocket(\"ws://ratchet.mydomain.org:8888\"); ws.onopen = function() { // Web Socket is connected. You can send data by send() method. ws