Exemple #1
0
 def __init__(self, app, hostname, io_loop=None, ssl_options=None, **kwargs):
     log.warn('Graphite listener is started -- if you do not need graphite, turn it off in datadog.conf.')
     log.warn('Graphite relay uses pickle to transport messages. Pickle is not secured against remote execution exploits.')
     log.warn('See http://blog.nelhage.com/2011/03/exploiting-pickle/ for more details')
     self.app = app
     self.hostname = hostname
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
Exemple #2
0
 def initialize(self,  # type: ignore
                request_callback: Union[httputil.HTTPServerConnectionDelegate,
                                        Callable[[httputil.HTTPServerRequest], None]],
                no_keep_alive: bool=False,
                xheaders: bool=False,
                ssl_options: Union[Dict[str, Any], ssl.SSLContext]=None,
                protocol: str=None,
                decompress_request: bool=False,
                chunk_size: int=None,
                max_header_size: int=None,
                idle_connection_timeout: float=None,
                body_timeout: float=None,
                max_body_size: int=None,
                max_buffer_size: int=None,
                trusted_downstream: List[str]=None) -> None:
     self.request_callback = request_callback
     self.xheaders = xheaders
     self.protocol = protocol
     self.conn_params = HTTP1ConnectionParameters(
         decompress=decompress_request,
         chunk_size=chunk_size,
         max_header_size=max_header_size,
         header_timeout=idle_connection_timeout or 3600,
         max_body_size=max_body_size,
         body_timeout=body_timeout,
         no_keep_alive=no_keep_alive)
     TCPServer.__init__(self, ssl_options=ssl_options,
                        max_buffer_size=max_buffer_size,
                        read_chunk_size=chunk_size)
     self._connections = set()  # type: Set[HTTP1ServerConnection]
     self.trusted_downstream = trusted_downstream
Exemple #3
0
 def __init__(self, app, hostname, io_loop=None, ssl_options=None, **kwargs):
     log.warn('Graphite listener is started -- if you do not need graphite, turn it off in datadog.conf.')
     log.warn('Graphite relay uses pickle to transport messages. Pickle is not secured against remote execution exploits.')
     log.warn('See http://blog.nelhage.com/2011/03/exploiting-pickle/ for more details')
     self.app = app
     self.hostname = hostname
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
 def __init__(self, io_loop=None, ssl_options=None, uid=None, **kwargs):
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
     self.uid = uid
     self.queue_metrics()
Exemple #5
0
    def __init__(self,
                 request_callback,
                 no_keep_alive=False,
                 io_loop=None,
                 xheaders=False,
                 ssl_options=None,
                 protocol=None,
                 gzip=False,
                 chunk_size=None,
                 max_header_size=None,
                 idle_connection_timeout=None,
                 body_timeout=None,
                 max_body_size=None,
                 max_buffer_size=None):

        # 回调对象,一个application对象,具有handlers的list
        self.request_callback = request_callback

        self.no_keep_alive = no_keep_alive
        self.xheaders = xheaders
        self.protocol = protocol
        self.conn_params = HTTP1ConnectionParameters(  # 基本的连接参数
            use_gzip=gzip,
            chunk_size=chunk_size,
            max_header_size=max_header_size,
            header_timeout=idle_connection_timeout or 3600,
            max_body_size=max_body_size,
            body_timeout=body_timeout)
        TCPServer.__init__(self,
                           io_loop=io_loop,
                           ssl_options=ssl_options,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=chunk_size)
        self._connections = set()  # 保存全部的连接
Exemple #6
0
    def __init__(self,
                 server_callback,
                 io_loop=None,
                 max_buffer_size=None,
                 read_chunk_size=None,
                 read_header_max_bytes=None,
                 read_header_timeout=None,
                 read_body_max_bytes=None,
                 read_body_timeout=None):

        #: default 100M
        max_buffer_size = max_buffer_size or 104857600
        read_header_timeout = 1

        #: default 64KB
        read_chunk_size = min(read_chunk_size or 65536, max_buffer_size // 2)

        self._io_loop = io_loop or IOLoop.instance()
        TCPServer.__init__(self,
                           io_loop=self._io_loop,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=read_chunk_size)

        self.server_callback = server_callback
        self.server_config = _ServerConfig(
            header_max_bytes=read_header_max_bytes,
            header_timeout=read_header_timeout,
            body_max_bytes=read_body_max_bytes,
            body_timeout=read_body_timeout)

        self._connections = set()
Exemple #7
0
 def __init__(self, io_loop=None, ssl_options=None, **kwargs):
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
     self.connections = {}
     events.register('proxy', self.proxy_event)
 def initialize(self,
                request_callback,
                no_keep_alive=False,
                io_loop=None,
                xheaders=False,
                ssl_options=None,
                protocol=None,
                decompress_request=False,
                chunk_size=None,
                max_header_size=None,
                idle_connection_timeout=None,
                body_timeout=None,
                max_body_size=None,
                max_buffer_size=None):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     self.protocol = protocol
     self.conn_params = HTTP1ConnectionParameters(
         decompress=decompress_request,
         chunk_size=chunk_size,
         max_header_size=max_header_size,
         header_timeout=idle_connection_timeout or 3600,
         max_body_size=max_body_size,
         body_timeout=body_timeout)
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        max_buffer_size=max_buffer_size,
                        read_chunk_size=chunk_size)
     self._connections = set()
Exemple #9
0
    def __init__(self,
                 p_name,
                 p_host,
                 p_port,
                 p_sendBufferSize,
                 p_recvBufferSize,
                 p_queue,
                 p_max_buffer_size=None,
                 p_read_chunk_size=None,
                 p_delimiter="\n"):
        TCPServer.__init__(self,
                           max_buffer_size=p_max_buffer_size,
                           read_chunk_size=p_read_chunk_size)
        self._name = p_name
        self._host = p_host
        self._port = p_port

        self._send_buffer_size = p_sendBufferSize
        self._recv_buffer_size = p_recvBufferSize

        self._delimiter = p_delimiter
        self._queue = p_queue

        self._request_waiting_timeout = Configure.configure().value(
            p_key="headless.webdriver.requestWaittingTimeout")
Exemple #10
0
 def initialize(
     self,
     request_callback,
     no_keep_alive=False,
     io_loop=None,
     xheaders=False,
     ssl_options=None,
     protocol=None,
     decompress_request=False,
     chunk_size=None,
     max_header_size=None,
     idle_connection_timeout=None,
     body_timeout=None,
     max_body_size=None,
     max_buffer_size=None,
 ):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     self.protocol = protocol
     self.conn_params = HTTP1ConnectionParameters(
         decompress=decompress_request,
         chunk_size=chunk_size,
         max_header_size=max_header_size,
         header_timeout=idle_connection_timeout or 3600,
         max_body_size=max_body_size,
         body_timeout=body_timeout,
     )
     TCPServer.__init__(
         self, io_loop=io_loop, ssl_options=ssl_options, max_buffer_size=max_buffer_size, read_chunk_size=chunk_size
     )
     self._connections = set()
    def __init__(self, port, prt_types, prt_types_handlers):

        PNFPServer.__init__(self, port, prt_types, prt_types_handlers)
        TCPServer.__init__(self)

        self.connection = None

        self.listen(self.port)
Exemple #12
0
 def __init__(self, storage, sender, io_loop=None, **kwargs):
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
     self.storage = storage
     if not os.path.exists(self.storage):
         os.mkdir(self.storage)
     self.loop = io_loop or ioloop.IOLoop.current()
     self.send_mail = sender
     self.loop.call_later(10, self.send_mails)
Exemple #13
0
 def __init__(self, request_callback, io_loop=None, auth_password=None, **kwargs):
     self.request_callback = request_callback
     self.stats = Stats()
     self.auth_password = auth_password
     self.require_auth = False
     if self.auth_password:
         self.require_auth = True
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
Exemple #14
0
 def __init__(self, request_callback, no_keep_alive=False, io_loop=None,
              xheaders=False, ssl_options=None, protocol=None, **kwargs):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     self.protocol = protocol
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options,
                        **kwargs)
Exemple #15
0
 def __init__(self, request_callback, no_keep_alive=False, io_loop=None,
              xheaders=False, ssl_options=None, protocol=None, **kwargs):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     self.protocol = protocol
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options,
                        **kwargs)
Exemple #16
0
 def __init__(self, connect_cb, disconnect_cb, data_cb, port=12345, host=''):
     TCPServer.__init__(self)
     self.connect_callback = connect_cb
     self.disconnect_callback = disconnect_cb
     self.data_callback = data_cb
     self.clients = []
     self.listen(port, host)
     logging.info('Listening on port: %i', port)
Exemple #17
0
 def __init__(self, io_loop=None, ssl_options=None, gp_module=False, **kwargs):
     self.logger = logging.getLogger(self.__class__.__name__)
     self.gp_module = gp_module
     try:
         TCPServer.__init__(self, ssl_options=ssl_options, **kwargs)
     except:
         etype, evalue, etb = sys.exc_info()
         self.logger.error("Could not create tcp server. Exception: %s, Error: %s." % (etype, evalue))
         self.gp_module.shutDown()
    def __init__(self, port, prt_types, prt_types_handlers):

        PNFPServer.__init__(self, prt_types, prt_types_handlers)
        TCPServer.__init__(self)

        self.port = int(port)
        self.connection = None

        self.listen(self.port)
Exemple #19
0
 def __init__(self,
              io_loop=None,
              ssl_options=None,
              gp_module=False,
              **kwargs):
     self.gp_module = gp_module
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
Exemple #20
0
 def __init__(self,
              p_name,
              p_callback,
              p_max_buffer_size=None,
              p_read_chunk_size=None):
     TCPServer.__init__(self,
                        max_buffer_size=p_max_buffer_size,
                        read_chunk_size=p_read_chunk_size)
     self._callback = p_callback
     self._name = p_name
Exemple #21
0
 def __init__(self,
              io_loop=None,
              ssl_options=None,
              gp_module=False,
              **kwargs):
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
     self.gp_module = gp_module
     self.address = socket.gethostname()
Exemple #22
0
    def __init__ (self, db_conn, cursor, role):
        self.conn = db_conn
        self.cur = cursor
        self.role = role

        if self.role == 'ota':
            self.conn_pool = DeviceServer.accepted_ota_conns
        else:
            self.conn_pool = DeviceServer.accepted_xchange_conns

        TCPServer.__init__(self)
Exemple #23
0
 def __init__(self,
              status=None,
              hass=None,
              io_loop=None,
              ssl_options=None,
              **kwargs):
     # logger.debug('tcp server started')
     self.clients = {}
     self._status = status
     self._hass = hass
     TCPServer.__init__(self, ssl_options=ssl_options, **kwargs)
Exemple #24
0
    def __init__(self, port, prt_types, prt_types_handlers):

        PNFPServer.__init__(self, prt_types, prt_types_handlers)
        TCPServer.__init__(self)

        self.port = int(port)
        self.ues = {}
        self.connection = None

        # self.listen(self.port, "127.0.0.1")
        self.listen(self.port)
Exemple #25
0
    def __init__ (self, db_conn, cursor, role):
        self.conn = db_conn
        self.cur = cursor
        self.role = role

        if self.role == 'ota':
            self.conn_pool = DeviceServer.accepted_ota_conns
        else:
            self.conn_pool = DeviceServer.accepted_xchange_conns

        TCPServer.__init__(self)
Exemple #26
0
 def __init__(self,
              request_callback,
              io_loop=None,
              auth_password=None,
              **kwargs):
     self.request_callback = request_callback
     self.stats = Stats()
     self.auth_password = auth_password
     self.require_auth = False
     if self.auth_password:
         self.require_auth = True
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
Exemple #27
0
 def __init__(self,
              rpc_class=None,
              io_loop=None,
              ssl_options=None,
              **kwargs):
     logging.info('a echo tcp server is started')
     assert rpc_class
     self.rpc_class = rpc_class
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
Exemple #28
0
    def __init__(self, port, pt_types, pt_types_handlers):

        PNFPServer.__init__(self, pt_types, pt_types_handlers)
        TCPServer.__init__(self)

        self.port = int(port)
        self.connection = None

        self.listen(self.port)

        self.lvaps = {}
        self.__assoc_id = 0
Exemple #29
0
    def __init__(self, port, pt_types, pt_types_handlers):

        PNFPServer.__init__(self, pt_types, pt_types_handlers)
        TCPServer.__init__(self)

        self.port = int(port)
        self.connection = None

        self.listen(self.port)

        self.lvaps = {}
        self.__assoc_id = 0
Exemple #30
0
 def __init__(self, io_loop=None, ssl_options=None, **kwargs):
     self.cache = LRUCache(options.capacity)
     self.dbw = ioloop.PeriodicCallback(self.dbw_callback,
                                        options.interval,
                                        io_loop=io_loop)
     self.dbw.start()
     self.connection_pool = ConnectionPool(lambda: Connection(),
                                           max_size=options.max_connection)
     TCPServer.__init__(self,
                        io_loop=io_loop,
                        ssl_options=ssl_options,
                        **kwargs)
Exemple #31
0
    def __init__(self, torrent, max_peers=50, download_path='downloads', peer_id=peer_id(), storage_class=DiskStorage):
        TCPServer.__init__(self)

        self.peer_id = peer_id
        self.torrent = torrent

        self.max_peers = max_peers
        self.connected_peers = set()
        self.connecting_peers = set()
        self.unconnected_peers = set()

        self.storage = storage_class.from_torrent(torrent, base_path=download_path)
Exemple #32
0
 def __init__(self, serverPort, salt, rate, pushAhead, packLimit, listenIp,
              listenPort):
     TCPServer.__init__(self)
     ioloop = IOLoop.current()
     connBase.__init__(self, ioloop, False)
     self.stream = u = UStreamClient(self, serverPort, salt, rate,
                                     pushAhead, packLimit)
     self.t = t = threading.Thread(target=u.doWork)
     t.setDaemon(True)
     IOLoop.current().add_callback(t.start)
     self.listen(listenPort, listenIp)
     self.connId = 0
     self.startTime = getRunningTime()
Exemple #33
0
 def __init__(self, data_queue: Queue, log_name: str,
              inputs: Dict[str, str], name: str) -> None:
     Process.__init__(self, name=name)
     TCPServer.__init__(self,
                        max_buffer_size=10485760000,
                        read_chunk_size=104857600)
     self.address: str = inputs["address"]
     self.port: int = inputs["port"]
     self.log: Logger = getLogger(log_name)
     self.log.info("Starting dial out client[%s]", self.name)
     self.url: str = f"http://{self.address}:{self.port}"
     self._header_size: int = 12
     self._header_struct: Struct = Struct(">hhhhi")
     self.data_queue: Queue = data_queue
Exemple #34
0
    def __init__(self, config, agentType):
        self._config = config
        self._log = getLogger()
        self._client = AsyncHTTPClient()
        self._syncClient = HTTPClient()

        self._agentType = agentType
        self._parseConfig()

        self._tunnel = 0
        self._hangUp = False

        self._stream = None

        TCPServer.__init__(self)
Exemple #35
0
    def __init__(self, config, agentType):
        self._config = config
        self._log = getLogger()
        self._client = AsyncHTTPClient()
        self._syncClient = HTTPClient()

        self._agentType = agentType 
        self._parseConfig()

        self._tunnel = 0
        self._hangUp = False

        self._stream = None

        TCPServer.__init__(self)
Exemple #36
0
    def __init__(self, env):
        self._env = env

        self._client = AsyncHTTPClient()

        self._syncClient = HTTPClient()

        config = env.config

        self._cid = config.channel
        self._url = '%s://%s' % (config.protocol, config.server)

        self._hangUp = False

        TCPServer.__init__(self)
Exemple #37
0
    def __init__(self, env):
        self._env = env
        
        self._client = AsyncHTTPClient()

        self._syncClient = HTTPClient()


        config = env.config

        self._cid = config.channel
        self._url = '%s://%s' % (config.protocol, config.server)

        self._hangUp = False

        TCPServer.__init__(self)
 def __init__(self):
     TCPServer.__init__(self)
     stream = TStreamClient('0.0.0.0', 11223)
     TOUManagerBase.__init__(stream)
     #super(TOUManagerClient,self).__init__()
     #self.ustream = UStreamClient()
     self.stream = TStreamClient('0.0.0.0', 11223)
     work1 = PeriodicCallback(self.stream_to_map, 10)
     work1.start()
     self.outputMap_byConn = {}
     self.outputMap_byId = {}
     self.maxCacheSize = 10 * 1024 * 1024
     self.outputSize = 0
     self.listen(9999, '0.0.0.0')
     self.connMap = {}
     self.eachConnWriteLimit = 1024 * 1024
     self.streamReadLeft = ''
Exemple #39
0
    def __init__(self,
                 torrent,
                 max_peers=50,
                 download_path='downloads',
                 peer_id=peer_id(),
                 storage_class=DiskStorage):
        TCPServer.__init__(self)

        self.peer_id = peer_id
        self.torrent = torrent

        self.max_peers = max_peers
        self.connected_peers = set()
        self.connecting_peers = set()
        self.unconnected_peers = set()

        self.storage = storage_class.from_torrent(torrent,
                                                  base_path=download_path)
Exemple #40
0
 def initialize(
     self,
     request_callback: Union[
         httputil.HTTPServerConnectionDelegate,
         Callable[[httputil.HTTPServerRequest], None],
     ],
     no_keep_alive: bool = False,
     xheaders: bool = False,
     ssl_options: Union[Dict[str, Any], ssl.SSLContext] = None,
     protocol: str = None,
     decompress_request: bool = False,
     chunk_size: int = None,
     max_header_size: int = None,
     idle_connection_timeout: float = None,
     body_timeout: float = None,
     max_body_size: int = None,
     max_buffer_size: int = None,
     trusted_downstream: List[str] = None,
 ) -> None:
     # This method's signature is not extracted with autodoc
     # because we want its arguments to appear on the class
     # constructor. When changing this signature, also update the
     # copy in httpserver.rst.
     self.request_callback = request_callback
     self.xheaders = xheaders
     self.protocol = protocol
     self.conn_params = HTTP1ConnectionParameters(
         decompress=decompress_request,
         chunk_size=chunk_size,
         max_header_size=max_header_size,
         header_timeout=idle_connection_timeout or 3600,
         max_body_size=max_body_size,
         body_timeout=body_timeout,
         no_keep_alive=no_keep_alive,
     )
     TCPServer.__init__(
         self,
         ssl_options=ssl_options,
         max_buffer_size=max_buffer_size,
         read_chunk_size=chunk_size,
     )
     self._connections = set()  # type: Set[HTTP1ServerConnection]
     self.trusted_downstream = trusted_downstream
 def __init__(self,serverPort,salt,rate,pushAhead,packLimit,listenIp,listenPort,timeoutTime,serverIp,\
              MPort,LPort,IDose,DDose,LGot,MRate,LRate,span,limit,speed,dose2,closeTime,ONum,commandId):
     TCPServer.__init__(self)
     ioloop = IOLoop.current()
     connBase.__init__(self, ioloop, False)
     self.stream = u = UStreamClient(self,serverPort,salt,rate,pushAhead,packLimit,timeoutTime,serverIp,\
                                     MPort,LPort,IDose,DDose,LGot,MRate,LRate,span,limit,speed,dose2,closeTime,ONum)
     self.t = t = threading.Thread(target=u.doWork)
     t.setDaemon(True)
     IOLoop.current().add_callback(t.start)
     self.listen(listenPort, listenIp)
     self.connId = 0
     self.startTime = getRunningTime()
     self.commandId = commandId
     PeriodicCallback(self.readCommand, 500).start()
     PeriodicCallback(self.writeCommand, 500).start()
     PeriodicCallback(self.flushLog, 1000).start()
     self.exit = False
     self.logCache = []
Exemple #42
0
 def initialize(
     self,
     request_callback: Union[
         httputil.HTTPServerConnectionDelegate,
         Callable[[httputil.HTTPServerRequest], None],
     ],
     no_keep_alive: bool = False,
     xheaders: bool = False,
     ssl_options: Union[Dict[str, Any], ssl.SSLContext] = None,
     protocol: str = None,
     decompress_request: bool = False,
     chunk_size: int = None,
     max_header_size: int = None,
     idle_connection_timeout: float = None,
     body_timeout: float = None,
     max_body_size: int = None,
     max_buffer_size: int = None,
     trusted_downstream: List[str] = None,
 ) -> None:
     # This method's signature is not extracted with autodoc
     # because we want its arguments to appear on the class
     # constructor. When changing this signature, also update the
     # copy in httpserver.rst.
     self.request_callback = request_callback
     self.xheaders = xheaders
     self.protocol = protocol
     self.conn_params = HTTP1ConnectionParameters(
         decompress=decompress_request,
         chunk_size=chunk_size,
         max_header_size=max_header_size,
         header_timeout=idle_connection_timeout or 3600,
         max_body_size=max_body_size,
         body_timeout=body_timeout,
         no_keep_alive=no_keep_alive,
     )
     TCPServer.__init__(
         self,
         ssl_options=ssl_options,
         max_buffer_size=max_buffer_size,
         read_chunk_size=chunk_size,
     )
     self._connections = set()  # type: Set[HTTP1ServerConnection]
     self.trusted_downstream = trusted_downstream
Exemple #43
0
    def __init__(self,
                 host="127.0.0.1",
                 port=8000,
                 handler=None,
                 ssl_options=None,
                 max_buffer_size=None,
                 read_chunk_size=None,
                 family=socket.AF_UNSPEC,
                 backlog=128,
                 reuse_port=False):
        self.server_entity.host = host
        self.server_entity.port = port
        self.server_entity.handler = handler.initialize(self)
        self.server_entity.family = family
        self.server_entity.backlog = backlog
        self.server_entity.reuse_port = reuse_port

        TCPServer.__init__(self,
                           ssl_options=ssl_options,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=read_chunk_size)
Exemple #44
0
    def __init__(self, request_callback, no_keep_alive=False, io_loop=None,
                 xheaders=False, ssl_options=None, protocol=None, gzip=False,
                 chunk_size=None, max_header_size=None,
                 idle_connection_timeout=None, body_timeout=None,
                 max_body_size=None, max_buffer_size=None):

        # 回调对象,一个application对象,具有handlers的list
        self.request_callback = request_callback

        self.no_keep_alive = no_keep_alive
        self.xheaders = xheaders
        self.protocol = protocol
        self.conn_params = HTTP1ConnectionParameters(  # 基本的连接参数
            use_gzip=gzip,
            chunk_size=chunk_size,
            max_header_size=max_header_size,
            header_timeout=idle_connection_timeout or 3600,
            max_body_size=max_body_size,
            body_timeout=body_timeout)
        TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=chunk_size)
        self._connections = set()  # 保存全部的连接
Exemple #45
0
 def __init__(self, ioloop, stream_handler):
     TCPServer.__init__(self, ioloop)
     self.stream_handler = stream_handler
 def __init__(self, mysql_config):
     TCPServer.__init__(self,)
     self.__linkdb_logic = linkdbLogic.linkdbLogic(mysql_config)
Exemple #47
0
 def __init__(self):
     TCPServer.__init__(self)
     self.client_list = []
Exemple #48
0
 def __init__(self, no_keep_alive=False, protocol=None, **kwargs):
     self.no_keep_alive = no_keep_alive
     self.protocol = protocol
     TCPServer.__init__(self, **kwargs)
Exemple #49
0
 def __init__(self, handler_class=None):
     TCPServer.__init__(self)
     if handler_class:
         self.handler_class = handler_class
Exemple #50
0
 def __init__ (self, db_conn, cursor, role):
     self.conn = db_conn
     self.cur = cursor
     self.role = role
     TCPServer.__init__(self)
 def __init__(self, mongodb_config):
     TCPServer.__init__(self,)
     self.__mongodb_handler = pagedbLogic.pagedbLogic(mongodb_config)
Exemple #52
0
 def __init__(self, io_loop=None, ssl_options=None, ank_accessor = None, **kwargs):
     logging.info('a echo tcp server is started')
     self.event_listeners = set([])
     self.ank_accessor = ank_accessor
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
Exemple #53
0
 def __init__(self, io_loop=None, **kwargs):
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
Exemple #54
0
 def __init__ (self, db_conn, cursor):
     self.conn = db_conn
     self.cur = cursor
     TCPServer.__init__(self)
 def __init__(self, io_loop=None, **kwargs):  
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)  
     Log.debug('==========io_loop:{}.'.format(io_loop))
Exemple #56
0
 def __init__ (self):
     self.role = 'xchange'
     TCPServer.__init__(self)
Exemple #57
0
 def __init__(self, connection_cls, streams, io_loop=None, **kwargs):
     self.connection_cls = connection_cls
     self.upstream_cls, self.stream_cls = streams
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
Exemple #58
0
 def __init__(self, gpio, io_loop=None, ssl_options=None, **kwargs):
     self.myGPIO = gpio
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
Exemple #59
0
 def __init__(self,requestFactory):
     TCPServer.__init__(self) # meh!
     self.requestFactory = requestFactory
     self.connections = set()