#NEWLINE# def server_set_up( addr , address_family = socket . AF_INET ) : #NEWLINE# #INDENT# def log_request( self , * args , **kwargs ) : #NEWLINE# #INDENT# " Making the server output 'quiet' " #NEWLINE# pass #NEWLINE# #UNINDENT# SimpleJSONRPCRequestHandler . log_request = log_request #NEWLINE# server = SimpleJSONRPCServer ( addr , address_family = address_family ) #NEWLINE# service = ExampleAggregateService ( ) #NEWLINE# server . register_instance ( service , allow_dotted_names = True ) #NEWLINE# server . register_function ( service . summation , 'sum' ) #NEWLINE# server . register_function ( service . summation , 'notify_sum' ) #NEWLINE# server . register_function ( service . summation , 'namespace.sum' ) #NEWLINE# server_proc = Thread ( target = server . serve_forever ) #NEWLINE# server_proc . daemon = True #NEWLINE# server_proc . start ( ) #NEWLINE# return server_proc