WebSocket握手期间出错:意外的响应代码:窗口中的404

时间:2015-09-19 20:47:24

标签: cakephp ratchet cakephp-2.6

我正在Windows上的Ratchet Cakephp Plugin上安装XAMPP。使用作曲家安装的插件 Cakephp Version- 2.6.7
ratchet (Plugin) - 0.1。*
ext-libevent未安装 - 实际上我不知道如何在Windows上安装它 当我开始使用websocket时 - 使用coommand

.\Console\cake Ratchet.websocket start

在浏览器的控制台中显示

WebSocket connection to 'ws://localhost/websocket' failed: Error during WebSocket handshake: Unexpected response code: 404
Please suggest solution. Thanks in advance.

Plugin / Ratchet / Config / botstrap.php

Configure::write('Ratchet', [
    'Client' => [
        'retryDelay' => 5000, // Not the best option but it speeds up development
        'maxRetries' => 25, // Keep on trying! (Also not the best option)
    ],
    'Connection' => [
        'websocket' => [
            'address' => '127.0.0.1',
            'port' => 8080,
        ],
        'external' => [
            'hostname' => 'localhost',
            'port' => 80,
            'path' => 'websocket',
            'secure' => false,
        ],
        'keepaliveInterval' => 23, // Why 23? Because NGINX kills after 30 seconds, set to 0 to disable
    ],
]);

0 个答案:

没有答案