I have implemented a simple server-client script like this:
Server:
class Server(Protocol):
def connectionMade(self):
while True:
self.transport.write('a')
Client
class Client(Protocol):
def dataReceived(self, data):
print data
What I expected was a string of infinite a's was printed on client window, but actually, there's nothing appeared. When I replace the while loop in Server with a finite loop, it works. So it seems like the function connectionMade needs to be terminated before the whole data can appear on Client side? Am I wrong?