Closed YunzhaoLu closed 6 years ago
Sorry the above message is from opening a javascript websocket connection. When I open K6nele websocket connection, I got following message:
HTTP/1.1 426 No Sec-WebSocket-Protocols requested supported Connection: Upgrade Upgrade: websocket Sec-WebSocket-Version: 13 X-Powered-By: Ratchet/0.4.1
Regards, Yunzhao
The difference is: in js, new WebSocket("ws://xx.xx.xx.xx:8888") not set "Sec-WebSocket-Protocol". In K6nele, client.websocket("ws://xx.xx.xx.xx:8888", ""), set "Sec-WebSocket-Protocol" = array("")
Close it.
Are you proposing to change something on the Kõnele side?
No. I changed on the server side to unset "Sec-WebSocket-Protocol" in the header when it is array of empty string(as empty array). I don't know why kaldi-gstreamer has no such problem.
I want to start a ratchet websocket service to collect audio data from K6nele. The websocket service is started, and I can open the websocket connection in javascript like: var ws = createWebSocket("ws://10.6.71.10:8001");
However, when I use K6nele with websocket url "ws://10.6.71.10:8001" to open websocket connection, the handshake message showed:
HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: GJVr5M5/N98Sk4n1Yl2FnZI2/Os= X-Powered-By: Ratchet/0.4.1
Is there any difference to open a websocket in k6nele comparing to javascript?
regards, Yunzhao