Sniffy uses heuristics to add delay for TCP connections.
Say we have specified a delay of D milliseconds and have the R receive buffer and S send buffer
-
Establishing connection adds D milliseconds delay
-
Sending N bytes where (n - 1) * S < N < n * S adds n * D milliseconds delay
-
Receiving N bytes where (n - 1) * R < N < n * R adds n * D milliseconds delay
-
Sending anything in the same thread as reading will trigger a delay on subsequent receive and vice versa
-
Calling sendUrgentData(int) method alls D milliseconds delay
-
Closing connection adds D milliseconds delay