poorconn.delay_before_sending_upon_acceptance_once¶
-
poorconn.
delay_before_sending_upon_acceptance_once
(s, t)¶ Delay
t
seconds before sending for all sockets returned bys.accept()
, for once (first time only). Parameters mean the same asdelay_before_sending_once()
.This function achieves the results by patching the connection sockets’ member methods
send()
andsendall()
. Theirsendfile()
methods are not patched due to their inconsistent behavior across operating systems.- Returns
A
DelayBeforeSendingUponAcceptanceOnceController
object that controls the patched socket object.- Parameters
s (socket.socket) –
t (float) –
- Return type
poorconn._send.DelayBeforeSendingUponAcceptanceOnceController