Commit 5947594f authored by Jeremy Hylton's avatar Jeremy Hylton

Add flush method.

parent 0b8b59f1
...@@ -451,6 +451,13 @@ class Connection(smac.SizedMessageAsyncConnection): ...@@ -451,6 +451,13 @@ class Connection(smac.SizedMessageAsyncConnection):
finally: finally:
self.replies_cond.release() self.replies_cond.release()
def flush(self):
"""Invoke poll() until the output buffer is empty."""
if __debug__:
self.log("flush")
while self.writable():
self.poll()
def poll(self): def poll(self):
"""Invoke asyncore mainloop to get pending message out.""" """Invoke asyncore mainloop to get pending message out."""
if __debug__: if __debug__:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment