#NEWLINE# def can_send( self ) : #NEWLINE# #INDENT# '\n        :return: bytes count that can be sent now\n        ' #NEWLINE# tdiff = ( time . time ( ) - self . last_send_time ) #NEWLINE# if ( tdiff <= 0 ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# max_quantum = ( max_send_size . speed * TIME_QUANTUM ) #NEWLINE# max_send_size = max ( 0 , min ( ( ( self . speed * tdiff ) - self . last_send_size ) , max_quantum ) ) #NEWLINE# return int ( max_send_size )