#NEWLINE# def receive_data_generator( self , delay_factor = 0.1 , max_loops = 150 ) : #NEWLINE# #INDENT# 'Generator to collect all data available in channel.' #NEWLINE# i = 0 #NEWLINE# while ( delay_factor <= max_loops ) : #NEWLINE# #INDENT# time . sleep ( delay_factor ) #NEWLINE# if self . remote_conn . recv_ready ( ) : #NEWLINE# #INDENT# ( yield self . remote_conn . recv ( MAX_BUFFER ) . decode ( 'utf-8' , 'ignore' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# time . sleep ( ( delay_factor * 8 ) ) #NEWLINE# if ( not self . remote_conn . recv_ready ( ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# i += 1