title: UDP Socket and ruby
body: <p>I am having trouble to bind to a server address. I have a connection, to a server (using Savon XML Library). Now I just need to listen to that server and gather its HTTP packets that sends. The server each time sends:</p>
  
  <pre><code>http://200.34.12.168/Videos/1/frame/0
  http://200.34.12.168/Videos/1/frame/1
  http://200.34.12.168/Videos/1/frame/2
  http://200.34.12.168/Videos/1/frame/3
  http://200.34.12.168/Videos/1/frame/4
  ...
  ..
  </code></pre>
  
  <p>which are HTTP packets. I am trying to create a UDP server that listens to these. This is what I have so far:</p>
  
  <pre><code>  s = UDPSocket.new
    s.bind('200.34.12.168', 80)
  
    5.times do
      text, sender = s.recvfrom(16)
      puts text
    end
  </code></pre>
  
  <p>it fails at the bind function. How can I listen to a UDP connection with ruby?</p>
  
  <p>The Error I get:
  "`bind': Can't assign requested address - bind(2) (Errno::EADDRNOTAVAIL)"</p>