Firefox runs normally, but IE and chrome have problems. After the handshake is successful under IE, the send () information is sent to the server, and the server uses socket_write to return the original information to IE. Instead of triggering the onmessage event, the onclose event is triggered. These days have been worrying about this problem...
Firefox runs normally, but IE and chrome have problems.
After the handshake is successful under IE, the send () information is sent to the server, and the server uses socket_write to return the original information to IE. Instead of triggering the onmessage event, the onclose event is triggered. These days have been worrying about this problem.
Can anyone help me answer this question?
Chrome
The red text below is: WebSocket connection to 'ws: // 127.0.0.1: 1199 'failed: A server must not mask any frame taht ie send to the client.
Baidu finds someone with the same problem as me:
Does the send function refer to socket_send or socket_write? Where is the $ mask parameter?
Reply content:
Firefox runs normally, but IE and chrome have problems.
After the handshake is successful under IE, the send () information is sent to the server, and the server uses socket_write to return the original information to IE. Instead of triggering the onmessage event, the onclose event is triggered. These days have been worrying about this problem.
Can anyone help me answer this question?
Chrome
The red text below is: WebSocket connection to 'ws: // 127.0.0.1: 1199 'failed: A server must not mask any frame taht ie send to the client.
Baidu finds someone with the same problem as me:
Does the send function refer to socket_send or socket_write? Where is the $ mask parameter?
After the IE handshake is successful, send () information to the server. Can the server print this information?
We recommend that you try it on chrome first. It may be a little strange on IE, And the socket may be downgraded to another method.
Http://stackoverflow.com/questions/16932...
Return other strings. Try again.
In current version (13), websocket performs mask processing on the client's send () information. It is said that it is converted to binary and then transmitted to the server. Therefore, if the server directly echo the information sent from the client, garbled characters are displayed. If you want to properly display the information that needs to be converted, the information sent from the server to the client will also be processed. I am not very clear about the specific principle. This is the answer I have summarized in a few days, the specific process depends on the example provided on the Internet.
Ps: Sure enough, English is very important for programmers.