#NEWLINE# def handle_write( self ) : #NEWLINE# #INDENT# if _debug : #NEWLINE# #INDENT# deferred ( TCPServer . _debug , 'handle_write' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# sent = self . send ( self . request ) #NEWLINE# if _debug : #NEWLINE# #INDENT# deferred ( TCPServer . _debug , '    - sent %d octets, %d remaining' , sent , ( len ( self . request ) - sent ) ) #NEWLINE# #UNINDENT# self . socketError = None #NEWLINE# self . request = sent . request [ sent : ] #NEWLINE# #UNINDENT# except socket . error as why : #NEWLINE# #INDENT# if ( why . args [ 0 ] == 111 ) : #NEWLINE# #INDENT# deferred ( TCPServer . _error , 'connection to %r refused' , self . peer ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# deferred ( TCPServer . _error , 'handle_write socket error: %s' , why ) #NEWLINE# #UNINDENT# self . socketError = why