title: UDP Java Datagram
body: <p>Writing a client/server based on UDP using Java.</p>
  
  <p>When the server constantly gets packets from the socket:</p>
  
  <pre><code>socket.receive(packet); 
  </code></pre>
  
  <p>And even though the client is sending multiple packets, say packet 1,2,3 and 4, the client can only get the packet 4. It makes no difference to resend all these packets or send them in the opposite sequence of 4,3,2 and 1. The client can only get the packet with larger sequence number, which is kind of magical. But what I actually want is to get all the 4 packets.</p>