Example #1
0
	def __work(self):

		log.init_thread()
		handler = nshead_handler(self.server)

		if self.server.init_callback:
			self.server.init_callback()

		while self.running:
			self.__consume(handler)
Example #2
0
	def __main(self):
		
		log.init_thread()
		self.epoll = select.epoll()
		self.__add_event(self.server.listen_fd.fileno())

		self.conn = {}
		
		while self.running:
			self.__produce()