コード例 #1
0
 def __init__(self,
              server_address,
              RequestHandlerClass,
              bind_and_activate=True):
     HTTPServer.__init__(self, server_address, RequestHandlerClass,
                         bind_and_activate)
     ThreadingMixIn.__init__(self)
コード例 #2
0
    def __init__(self, ip, port, bf_callback):
        self.m_ip = ip
        self.m_port = port
        self.m_bf_callback = bf_callback
        ThreadingMixIn.__init__(self)
        HTTPServer.__init__(self, (self.m_ip, self.m_port), MiddlewareHttpHandler)

        self.m_thread = threading.Thread(target = self.run_server)
コード例 #3
0
    def __init__(self,
                 server_address,
                 RequestHandlerClass,
                 bind_and_activate=True):
        HTTPServer.__init__(self, server_address, RequestHandlerClass,
                            bind_and_activate)
        ThreadingMixIn.__init__(self)

        def serve_forever(self, poll_interval=0.1):
            super().serve_forever(poll_interval)
コード例 #4
0
ファイル: server.py プロジェクト: kjh948/victor
 def __init__(self, capture_path, server_address, RequestHandlerClass, bind_and_activate=True):
     HTTPServer.__init__(self, server_address, RequestHandlerClass, bind_and_activate)
     ThreadingMixIn.__init__(self)
     try:
         # verifies whether is a webcam
         capture_path = int(capture_path)
     except TypeError:
         pass
     self._capture_path = capture_path
     fps = 30
     self.read_delay = 1. / fps
     self._lock = threading.Lock()
     self._camera = cv2.VideoCapture()
     self._camera.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
     self._camera.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
コード例 #5
0
    def __init__(self, ip, port):
        self.m_ip = ip
        self.m_port = port

        self.transaction_ctrl = TransactionController(self.send_response)

        self.m_request_list = {}
        self.m_notification_list = {}
        self.m_cRes_packets_wainting = {}
        self.m_timer_list = {}

        ThreadingMixIn.__init__(self)
        HTTPServer.__init__(self, (self.m_ip, self.m_port),
                            AcsHttpRequestHandler)
        print('INFO : Launching ACS HTTP server on ' + str(self.m_ip) + ':' +
              str(self.m_port))
        self.serve_forever()
コード例 #6
0
ファイル: video_file_server.py プロジェクト: usnistgov/ACE
 def __init__(self,
              capture_path,
              server_address,
              loop_play,
              RequestHandlerClass,
              bind_and_activate=True):
     HTTPServer.__init__(self, server_address, RequestHandlerClass,
                         bind_and_activate)
     ThreadingMixIn.__init__(self)
     try:
         # verifies whether is a webcam
         capture_path = int(capture_path)
     except TypeError:
         pass
     except ValueError:
         pass
     self._capture_path = capture_path
     fps = 30
     self.read_delay = 1. / fps
     self._lock = threading.Lock()
     self._camera = cv2.VideoCapture(capture_path)
     self.loop_play = loop_play
コード例 #7
0
 def __init__(self, server_address):
     ThreadingMixIn.__init__(self)
     TCPServer.__init__(self, server_address, NetflixHttpRequestHandler)
     # Define shared members
     self.netflix_session = NetflixSession()
コード例 #8
0
ファイル: httpServer.py プロジェクト: Andresrodart/Practicas
	def __init__(self, numThreads=10):
		self.numThreads=numThreads
		ThreadingMixIn.__init__(self)