title: How to set id of a socket in WebSocket?
body: <p>I'm using: <a href="https://github.com/websockets/ws" rel="nofollow noreferrer">https://github.com/websockets/ws</a> as websockets.</p>
  
  <p>In socket.io you could give an id to your sockets like:</p>
  
  <pre><code>io.emit('id','myText');
  
  io.on('id',function(data){
      //read data
  });
  </code></pre>
  
  <p>In websocket on the server you can read sockets by id. </p>
  
  <pre><code>ws.on('id', function (data) {
  
  };
  </code></pre>
  
  <p>You can read sockets by id on the client too.</p>
  
  <pre><code>ws.addEventListener('id', function (data) {
  
  };
  </code></pre>
  
  <p>But I couldn't find how to send a socket with a specific id, I've also checked the code base. Am I missing something or is this impossible? Or are there some hacks that could achieve this?</p>
  
  <pre><code>//I want this:
  ws.send('id','myText');
  </code></pre>