def __init__(self, args): self.__running = False self.__args = args print 'service created' self.__menu = InterfaceFactory.menu(False, self.__args) print 'services started: %s:%s' % (Config.get_server()['address'], Config.get_server()['web_port']) signal.signal(signal.SIGINT, self.quit)
def __init__(self): Thread.__init__(self) self.daemon = True self.__running = False self.__port = Config.get_server()['socket_update_port'] self.__server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.__server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.__name = 'Update Server'
def __init__(self): Thread.__init__(self) self.daemon = True self.__running = False self.__master = SqlMaster() self.__port = Config.get_server().get('sql_port') self.__server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.__server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.__name = 'Sql Server'
def __init__(self): _server = Config.get_server() self.__congress = [ Threaded(ghost=Ghost.SERVER, ip=_server['address'], port=_server['ghost_port']), Threaded(ghost=Ghost.UPDATE, port=_server['ghost_update_port']) ] self.__name = 'Ghost Server'
def __init__(self, url): """ Server object is used to host the normal WebServer. No parameters are needed. """ Thread.__init__(self) self.daemon = True self.__url = url _server = Config.get_server() self.__server = WebServer((_server['address'], _server['web_port']), ClientHandler) self.__server.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.__server.allow_reuse_address = socket.SO_REUSEADDR cert = _server['cert'] key = _server['key'] if cert and key: self.__server.socket = ssl.wrap_socket(self.__server.socket, certfile=cert, keyfile=key, server_side=True) self.__name = 'Web Server'
class StaticSqlAccess(type): PORT = Config.get_server().get('sql_port') @staticmethod def set_port(port): StaticSqlAccess.PORT = port
def __init__post(self): _server = Config.get_server() self.__url = 'https://' if Config.get('cert') and Config.get('key') else 'http://' self.__url += '%s:%s' % (_server['address'], _server['web_port']) self.__servers = InterfaceFactory.servers(self.__cli, self.__url) self.__sql = InterfaceFactory.sql(self.__cli)
def __init__(self): _server = Config.get_server() self.__congress = [Threaded(ghost=Ghost.SERVER, ip=_server['address'], port=_server['ghost_port']), Threaded(ghost=Ghost.UPDATE, port=_server['ghost_update_port'])] self.__name = 'Ghost Server'