Part of bzrlib.tests.stub_sftp View In Hierarchy
This changes recv, send, and sendall to add a fixed latency to each python call if a new roundtrip is detected. That is, when a recv is called and the flag new_roundtrip is set, latency is charged. Every send and send_all sets this flag.
In addition every send, sendall and recv sleeps a bit per character send to simulate bandwidth.
Not all methods are implemented, this is deliberate as this class is not a replacement for the builtin sockets layer. fileno is not implemented to prevent the proxy being bypassed.
Method | __init__ | |
Method | sleep | Undocumented |
Method | __getattr__ | Undocumented |
Method | dup | Undocumented |
Method | recv | Undocumented |
Method | sendall | Undocumented |
Method | send | Undocumented |