Ejemplo n.º 1
0
 def __init__(self):
     super().__init__()
     self.waiting_task_list: Queue[dict]
     self.input = InputThread(callback_task_finish=self.stop_task,
                              callback_add_task=self.add_task,
                              callback_exit=self.callback_exit)
     self.input.daemon = True
     self.input.start()
     self.server = Server(interface=self)
     self.server.daemon = True
     self.server.start()
     self.timer = TimerThread(self.callback_timer_add_task)
     self.timer.daemon = True
     self.timer.start()
Ejemplo n.º 2
0
 def __init__(self, token):
     self.token = token
     self.server = Server(self.token, False)
Ejemplo n.º 3
0
#-------------------------------------------------------------------------------
# Copyright (c) 2014 Gael Honorez.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# http://www.gnu.org/licenses/gpl.html
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#-------------------------------------------------------------------------------


from _server import ServerMain as Server
# Initialize all important globals

SERVER_PORT = 10001

instance = Server()