26 Apr
2005
26 Apr
'05
11:30 p.m.
Hi, I'm just starting to write a simple client, whose protocol inherits from basic.LineReceiver: class MyClientProtocol(basic.LineReceiver): def connectionMade(self): stdout.write("\nconnectionMade\n") self.transport.write("test\r\n") # time.sleep(10) now if I un-comment the "time.sleep(10)", the server doesn't receive the "test\r\n" message until 10 seconds later, basically after the connectionMade() returns. Is there anyway to "flush" the buffer so the transport will send the "test\r\n" right away? Thanks. Z.