i asked this previous question here:
tcp two sides trying to connect simultaneously
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.
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?