2
GET ws://echo.websocket.org/ HTTP/1.1
Origin: http://websocket.org
Cookie: __utma=99as
Connection: Upgrade
Host: echo.websocket.org
Sec-WebSocket-Key : uRovscZjNol/umbTt5uKmw==
Upgrade: websocket
Sec-WebSocket-Version: 13

https://www.websocket.org/echo.html

I tried to connect using the above page, but there was no response.

If you have any other way, please let me know.

I was connected to the same network, of course.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
revol
  • 21
  • 1
  • 2
  • `wss://echo.websocket.org` doesn't work. Even the test page you linked to can't connect to it. But if you actually read what the page says, it says "*We host a WebSocket Echo Server at **ws://demos.kaazing.com/echo**,*" and `wss://demos.kaazing.com/echo` works fine from that page – Remy Lebeau Jan 30 '19 at 07:22

3 Answers3

5

echo.websocket.org was shut down sometime in 2021 when the company was acquired and changed their name. Try going to www.websocket.org and you'll see the service is not longer available.

I created a replacement for echo.websocket.org for developers to play around with at echo.websocket.events.

I also wrote a blog post about how you can run your own echo server with docker or on heroku https://www.lob.com/blog/websocket-org-is-down-here-is-an-alternative

Sid Maestre
  • 76
  • 1
  • 2
1

To connect to wss://echo.websocket.org, using php, without libraries:

<?php  
$sock = stream_socket_client("ssl://echo.websocket.org:443",$e,$n,30,STREAM_CLIENT_CONNECT,stream_context_create(null));
if(!$sock){
 echo"[$n]$e".PHP_EOL;
} else {
  fwrite($sock,"GET / HTTP/1.1\r\nHost: echo.websocket.org\r\nAccept: */*\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: ".rand(0,999)."\r\n\r\n");
  while(!feof($sock)){
    var_dump(fgets($sock,2048));
  }
}

This handles the key handshake for the wss encrypted flux.

Response should looks like:

HTTP/1.1 101 Web Socket Protocol Handshake
Connection: Upgrade
Date: Fri, 15 Nov 2019 05:15:36 GMT
Sec-WebSocket-Accept: wl5g9FOLmrZUguiPZeig/2uiI9o=
Server: Kaazing Gateway
Upgrade: websocket

Same code as a command line:

php -r '$sock=stream_socket_client("ssl://echo.websocket.org:443",$e,$n,30,STREAM_CLIENT_CONNECT,stream_context_create(null));if(!$sock){echo"[$n]$e".PHP_EOL;}else{fwrite($sock,"GET / HTTP/1.1\r\nHost: echo.websocket.org\r\nAccept: */*\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: ".rand(0,999)."\r\n\r\n");while(!feof($sock)){var_dump(fgets($sock,2048));}}'

See other similar usages here

NVRM
  • 11,480
  • 1
  • 88
  • 87
0

Echo.websocket.org is down, please use wss://demo.piesocket.com

This service needs an API key that you can find here: https://www.piesocket.com/websocket-tester

Reference: An Alternative To Echo.WebSocket.Org

Anand Singh
  • 1,091
  • 13
  • 21