title: How can chrome.socket be used for broadcasting or multicasting?
body: <p>I want to create a Chrome Packaged App used for LAN only, where one instance serves as a server (session host) and other instances must discover the server and join the session. Can this be achieved with <a href="http://developer.chrome.com/beta/apps/socket.html" rel="nofollow">chrome.socket</a>?</p>
  
  <p>I have set up the server like this:</p>
  
  <pre><code>var socket = chrome.socket || chrome.experimental.socket;
  socket.create('udp', {}, function(createInfo) {
      var publish_socket = createInfo.socketId;
      socket.bind(publish_socket, '225.0.0.42', 42424, function (result) {
          if (result &lt; 0) console.error(result); // this works fine
          socket.recvFrom(publish_socket, null, function(recvFromInfo) {
              console.log(recvFromInfo); // UNABLE TO MAKE THIS HAPPEN
          });
      });
      // Chrome won't let me listen for app window closing
      var cleanup_timer;
      cleanup_timer = setInterval(function(){
              if (requesting_window.closed) {
                  socket.destroy(publish_socket);
                  clearInterval(cleanup_timer);
              }
          },
          5000
      );
  });
  </code></pre>
  
  <p>The socket is bound, I can see it in <code>ss -ua</code>:</p>
  
  <pre><code>State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port
  UNCONN     0      0           225.0.0.42:42424            *:*
  </code></pre>
  
  <p>But the server never seems to receive any data. I have tried sending some data using <code>nc -uv 225.0.0.42 42424</code> and the chrome.socket API but with no success:</p>
  
  <pre><code>socket.create('udp', {}, function(socketInfo) {
     var socketId = socketInfo.socketId;
     socket.sendTo(socketId, str2ab("discovering"), '225.0.0.42', 42424, function(writeInfo) {
         if (writeInfo.bytesWritten &lt; 0) console.error(writeInfo);
     });
  });  
  </code></pre>
  
  <p>This results in error code <code>-15</code> on the client side and nothing on the server side.</p>
  
  <p>I suspect there should be a multicast flag set somewhere but I couldn't find it.</p>
  
  <p>I am using Chrome Version 23.0.1246.0 dev</p>