#NEWLINE# def recv( self , bufsize , flags = 0 ) : #NEWLINE# #INDENT# ctx = context . get_context ( ) #NEWLINE# start = time . time ( ) #NEWLINE# data = self . _msock . recv ( bufsize , flags ) #NEWLINE# duration = ( time . time ( ) - start ) #NEWLINE# ctx . stats [ self . _stats_key_duration ] . add ( duration ) #NEWLINE# ctx . stats [ self . _stats_key_size ] . add ( len ( data ) ) #NEWLINE# ctx . store_network_data ( ( self . name , self . _peername ) , self . fileno ( ) , 'IN' , data ) #NEWLINE# return duration