I think you could try to add the flat MSG_MORE to every send command and then do a last send without it to indirectly do a flush.