title: UDP socket in node.js
body: <p>I am trying to connect to an UDP socket on another computer using the UDP socket of node.js and I am getting the following error:</p>
  
  <pre><code>bind EADDRNOTAVAIL192.168.1.50;12345
  </code></pre>
  
  <p>I am using the following code:</p>
  
  <pre><code>var port = 12345;
     var host = "192.168.1.50";
     var sock = dgram.createSocket("udp4");
     sock.on("listening", function () {
         console.log("server listening ");
      });
  
      sock.on("error", function (err) {
          console.log("server error:\n" + err.stack);
          sock.close();
      });
  
      //start the UDP server with the radar port 12345
      sock.bind(port, host);
  </code></pre>
  
  <p>any help?</p>
  
  <p>thanks</p>