#NEWLINE# def server_proc( conn , coro = None ) : #NEWLINE# #INDENT# afd = asyncoro . asyncfile . AsyncFile ( conn ) #NEWLINE# csum = hashlib . sha1 ( ) #NEWLINE# nlines = 0 #NEWLINE# while True : #NEWLINE# #INDENT# line = ( yield afd . readline ( ) ) #NEWLINE# if ( not line ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# csum . update ( line ) #NEWLINE# nlines += 1 #NEWLINE# #UNINDENT# afd . close ( ) #NEWLINE# print ( ( 'server sha1 csum: %s' % csum . hexdigest ( ) ) ) #NEWLINE# print ( ( 'lines: %s' % nlines ) )