#NEWLINE# def set_nodelay( self , value ) : #NEWLINE# #INDENT# if ( ( self . socket is not None ) and ( self . socket . family in ( socket . AF_INET , socket . AF_INET6 ) ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . socket . setsockopt ( socket . IPPROTO_TCP , socket . TCP_NODELAY , ( 1 if value else 0 ) ) #NEWLINE# #UNINDENT# except socket . error as e : #NEWLINE# #INDENT# if ( e . errno not in ( errno . EINVAL , errno . ECONNRESET ) ) : #NEWLINE# #INDENT# raise