def __init__(self, interface, port, secure=False): daemon.__init__(self, interface, port, secure, name='JSONRPCDaemon') if self.secure: handler_class = SecureJSONRPCRequestHandler server_class = SecureThreadedJSONRPCServer if self.ipv6: server_class = SecureThreadedJSONRPCServer6 else: handler_class = SimpleJSONRPCRequestHandler server_class = SimpleThreadedJSONRPCServer if self.ipv6: server_class = SimpleThreadedJSONRPCServer6 self.server = server_class((interface, port), handler_class, 0)
def __init__(self, interface, port, secure=False): daemon.__init__(self, interface, port, secure, name='HTTPDaemon') if self.secure: handler_class = SecureRequestHandler server_class = SecureThreadedHTTPServer if self.ipv6: server_class = SecureThreadedHTTPServer6 else: handler_class = SimpleHTTPRequestHandler server_class = SimpleThreadedHTTPServer if self.ipv6: server_class = SimpleThreadedHTTPServer6 self.server = server_class((interface, port), handler_class, 1)
def __init__(self, interface, port, secure=False): daemon.__init__(self, interface, port, secure, name='WebDAVServerThread') if self.secure: handler_class = SecureWebDAVAuthRequestHandler server_class = SecureThreadedHTTPServer if self.ipv6: server_class = SecureThreadedHTTPServer6 else: handler_class = WebDAVAuthRequestHandler server_class = BaseThreadedHTTPServer if self.ipv6: server_class = BaseThreadedHTTPServer6 handler_class._config = setupConfig() handler_class.IFACE_CLASS = TrytonDAVInterface(interface, port, secure) handler_class.IFACE_CLASS.baseurl = handler_class._config.DAV.baseurl self.server = server_class((interface, port), handler_class)