title: EventMachine - Port is in use
body: <p>Getting a port is already in use error.</p>
  
  <pre><code>require 'em-websocket'
  EM.run {
      EM::WebSocket.run(:host =&gt; "192.168.1.100", :port =&gt; 9001) do |ws|
          # Code goes here...
      end
  }
  </code></pre>
  
  <p>Then on the same server at the same time but <strong>different IP Address</strong>:</p>
  
  <pre><code>require 'em-websocket'
  
  EM.run {
      EM::WebSocket.run(:host =&gt; "192.168.1.101", :port =&gt; 9001) do |ws|
          # Code goes here...
      end
  }
  </code></pre>
  
  <p>Then I get this error... Ports should bound to separate IP addresses, and thus be available to use.</p>
  
  <p><code>/usr/local/rvm/gems/ruby-1.9.3-p194/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in 'start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
  </code></p>
  
  <p>Am I missing something?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Running: <code>netstat -tulpn | grep ruby</code> shows:</p>
  
  <pre><code>tcp        0      0 0.0.0.0:9001                0.0.0.0:*                   LISTEN      718/ruby
  </code></pre>
  
  <p>Clearly shows the server is bound to <code>0.0.0.0</code> And Not <code>192.168.1.100</code></p>
  
  <p>How can I get <code>eventmachine</code> to bind to <code>192.168.1.100</code>?</p>
  
  <p>Seems like a bug...</p>