Hi experts
I have a program written by twisted to receive data from the server.
But the speed is a little slow.
The problem happened in the code below
def dataReceived(self, data):
"""
Appends newly received data to the receive buffer, and
then attempts to parse as many messages as possible.
"""
# Buffer possibly incomplete data first
self.receiveBuffer += data
# Attempt to parse as many messages as possible
while(self.parseBuffer()):
pass
the function of parseBuffer will return false if the self.receiveBuffer
has no message, and then the twisted will receive data from buffer
again.
Because the function of parseBuffer is a litter time consuming, so the
receive buffer is full sometimes.
Could there anybody help me out? Thanks a lot.
Best
Regards,
Xiao peng
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python