Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket issue #58

Closed
YunzhaoLu opened this issue Jul 18, 2018 · 4 comments
Closed

websocket issue #58

YunzhaoLu opened this issue Jul 18, 2018 · 4 comments

Comments

@YunzhaoLu
Copy link

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

@YunzhaoLu
Copy link
Author

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

@YunzhaoLu
Copy link
Author

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.

@Kaljurand
Copy link
Owner

Are you proposing to change something on the Kõnele side?

@YunzhaoLu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants