title: Use ReactPHP Socket to open a ws:// socket
body: <p>I've been trying to get ReactPHP socket up and running for a bit now, once up, I can telnet to it on the specified port but I cannot use websocat or any js lib to connect via ws:// protocol. Any help would be appreciated. </p>
  
  <pre><code>    $loop = React\EventLoop\Factory::create();
      $socket = new React\Socket\Server('127.0.0.1:8000', $loop);
  
      $socket-&gt;on('connection', function(ConnectionInterface $connection) use ($colors) {
          $connection-&gt;write("Hello " . $connection-&gt;getRemoteAddress() . "!\n");
  
          $connection-&gt;on('data', function($data) use ($connection){
              $connection-&gt;write('received: ' . strtoupper($data));
          });
      });
  
      echo "Listening on {$socket-&gt;getAddress()}\n";
  
      $loop-&gt;run();
  </code></pre>
  
  <p><strong>Server:</strong></p>
  
  <pre><code>Listening on tcp://127.0.0.1:8000
  </code></pre>
  
  <p><strong>Client:</strong></p>
  
  <pre><code>websocat ws://localhost:8000
  websocat: WebSocketError: HTTP failure
  websocat: error running
  </code></pre>