使用React Native客户端和Jetty Spring服务器的无效Sec-WebSocket-Accept响应

Ami*_*hah 5 spring-websocket react-native

var ws = new WebSocket('ws://localhost:8080/activity/hello');

ws.onopen = () => {
    // connection opened
    ws.send('something'); // send a message
};

ws.onmessage = (e) => {
   // a message was received
    console.log(e.data);
};

ws.onerror = (e) => {

    // an error occurred
    console.log(e.message);
};

ws.onclose = (e) => {
    // connection closed
    console.log(e.code, e.reason);
};
Run Code Online (Sandbox Code Playgroud)

如何获得服务器返回的值?客户还期望什么?

谢谢阿米什