我需要使用ssl配置我的项目。
所以,我有Mamp Pro,我已经创建了一个新的Generated SSL证书。 我的服务器正在通过Https运行,
现在,我无法通过Javascripts客户端连接到服务器: 10秒后,这是我得到的javascripts错误:
与'wss://127.0.0.1:4000 /'的WebSocket连接失败:连接建立错误:net :: ERR_TIMED_OUT (索引):111无法建立断开连接。代码3
这是我的配置:
gos_web_socket:
pushers:
wamp:
host: 127.0.0.1
port: 4000
server:
port: 4000 #The port the socket server will listen on
host: 127.0.0.1 #The host ip to bind to
router:
resources:
- @AppBundle/Resources/config/pubsub/routing.yml
这是javascripts代码: var websocket = WS.connect(“wss://127.0.0.1:4000”);
websocket.on("socket/connect", function(session)
请帮忙吗?