本文整理汇总了Python中SocketServer.StreamRequestHandler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python StreamRequestHandler.__init__方法的具体用法?Python StreamRequestHandler.__init__怎么用?Python StreamRequestHandler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocketServer.StreamRequestHandler
的用法示例。
在下文中一共展示了StreamRequestHandler.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.commands = dict((cmd, getattr(self, "_%s" % cmd.lower())) for cmd in COMMANDS)
self.client = None
self.player = None
self.game = None
self.servicing = True
StreamRequestHandler.__init__(self, *args, **kwargs)
示例2: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.proxy_object = kwargs.pop('proxy_object', self)
# LOL, standard library stuff is old style class
#
# super(CborRpcHandler, self).__init__(*args, **kwargs)
#
# So, call the super constructor the old way ...
# Work gets done in the constructor! WTF!
StreamRequestHandler.__init__(self, *args, **kwargs)
示例3: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, id_, *args, **kwargs):
self._id = id_
self._peer = config["peer"]
# self._tgt_ip = config["target_ip"]
# self._tgt_port = config["target_port"]
self._tcp_sock = None
self._icmp_sock = None
self._thread = None
StreamRequestHandler.__init__(self, *args, **kwargs)
示例4: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server):
"""
初始化函数
"""
# self.logger = comm_log(123321)
# self.logger.info(u'服务端初始化成功')
SRH.__init__(self, request, client_address, server)
示例5: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self,*args,**kwargs):
if isinstance(SensorRecvTCPServerHandler.mongo_connection, SensorMongoORM) is not True:
initializationConfigParser = InitializationConfigParser("ServerConfig.ini")
databaseConnectConfig = initializationConfigParser.GetAllNodeItems("DataBase")
databaseConnectConfig["port"] = int(databaseConnectConfig.get("port"))
SensorRecvTCPServerHandler.mongo_connection = SensorMongoORM(**databaseConnectConfig)
logging.info(SensorRecvTCPServerHandler.mongo_connection)
self.terminal_owner = None
self.terminal_address = None
StreamRequestHandler.__init__(self,*args,**kwargs)
示例6: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server):
self.connection_time = datetime.today()
self.last_connection_check = datetime.today()
self.in_data = None
self.out_data = None
self.control = server.control
self.read_errors = 0
self.write_errors = 0
self.request_errors = 0
self.client_full_address = "%s:%s" % (client_address[0],
client_address[1])
StreamRequestHandler.__init__(self, request, client_address, server)
示例7: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server, data_cache):
self.data_cache = data_cache
StreamRequestHandler.__init__(self, request, client_address, server)
示例8: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server):
self.pipe_control_handler = None
StreamRequestHandler.__init__(self, request, client_address, server)
示例9: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, *args, **kwargs):
assert self.APP is not None
assert self.APP_RUNNER is not None
StreamRequestHandler.__init__(self, *args, **kwargs)
示例10: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server):
self._read_buffer = ""
StreamRequestHandler.__init__(self, request, client_address, server)
示例11: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.env = {}
StreamRequestHandler.__init__(self, *args, **kwargs)
示例12: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server, legal_options,
legal_longoption, users, req_id, bto_dir, bto_blas):
BTORequestHandler.__init__(self, legal_options, legal_longoption,
users, req_id, bto_dir, bto_blas)
StreamRequestHandler.__init__(self, request, client_address, server)
示例13: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, request, client_address, server):
self._conversation_id = None
self._messages = Queue()
# This is a blocking call, so we have to set our fields before calling
StreamRequestHandler.__init__(self, request, client_address, server)
示例14: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, requestNumber, *args):
self.requestNumber = requestNumber
StreamRequestHandler.__init__(self, *args)
示例15: __init__
# 需要导入模块: from SocketServer import StreamRequestHandler [as 别名]
# 或者: from SocketServer.StreamRequestHandler import __init__ [as 别名]
def __init__(self, *args, **kwargs):
StreamRequestHandler.__init__(self, *args, **kwargs)