title: UDP stream reading like socat
body: <p>I'm developing a tool which is analyzing video stream.
  I've worked with a file, I generate the file with this socat command (that someone's given to me):</p>
  
  <pre><code>socat -u UDP4-RECV:1234,ip-add-membership=xxx.xxx.xxx.xxx:0.0.0.0 CREATE:temp.ts
  </code></pre>
  
  <p>But now I'd like to work directly with the UDP stream.
  With this code, I've tried to read the first received block and write it on the console, but I don#t get anything - the program gets stuck...</p>
  
  <pre><code>void Decoder::open_udp_stream(std::string ip_adress)
  {
      boost::asio::io_service io_service;
  
      udp::endpoint receiver_endpoint (boost::asio::ip::address::from_string("xxx.xxx.xxx.xxx"), 1234);
  
      udp::socket socket(io_service);
      socket.open(udp::v4());
  
      boost::array&lt;char, 128&gt; recv_buf;
      udp::endpoint sender_endpoint;
      size_t len = socket.receive_from(boost::asio::buffer(recv_buf), sender_endpoint);
  
      std::cout.write(recv_buf.data(), len);
  }
  </code></pre>
  
  <p>What should I do to get the blocks from this IP, as with the socat command ?</p>