var connection = new autobahn.Connection({ // 服务器地址 url: 'ws://localhost:9090', realm: 'realm1' });
php bin/wamp-server.php
var connection = new autobahn.Connection({ // 设置运行时环境 transports: [ { type: 'websocket', url: 'ws://localhost:9090/ws', max_retries: 10 } ], realm: 'realm1' });
use Ratchet\Wamp\WampServerInterface;
class MyApp implements WampServerInterface { // ... }
如果问题仍然存在,请检查控制台日志或过滤器获取更多信息。