I create a server using the SocketTest v 3.0.0
program.
I tried to connect with JavaScript to my own server,
When undefined appears in the console, I get a message from a javaScript client;
Message is;
GET / HTTP/1.1
Host: 127.0.0.1:9090
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.6 Safari/537.36
Upgrade: websocket
Origin: chrome://new-tab-page
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,tr-TR;q=0.8,tr;q=0.7
Sec-WebSocket-Key: yeTxrheLM3XMmBowpT5DhQ==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
When I run ws.send("hello server")
I got this error;
Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
After waiting for a while, the client turns itself off automatically.