immediately write output data to socket

is there a reason to not call self.initiate_send() on network layer send()?

Not calling initiate_send() cases network tx delays, grouping some stanzas in same "batch".

Side effect: chatstate composing/paused and message is often sent on same "batch", making chatstate useless