title: when is the push flag set in tcp segment
body: <p>i asked this previous question here:</p>
  
  <p><a href="https://stackoverflow.com/questions/2231283/tcp-two-sides-trying-to-connect-simultaneously">tcp two sides trying to connect simultaneously</a></p>
  
  <p>i tried the method given in the solution and while sending while using netcat and sniffing packets with ethereal i observed that when i sent a "hello" string from one side to the other it was sent in a segment with the push flag set.</p>
  
  <p>who decides to set the push flag?
  what are the rules for setting the push or urgent flag in a tcp segment?
  is it possible to do it using the sockets api?</p>