当前位置: 首页>>代码示例>>Python>>正文


Python WSGIServer.__init__方法代码示例

本文整理汇总了Python中wsgiref.simple_server.WSGIServer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python WSGIServer.__init__方法的具体用法?Python WSGIServer.__init__怎么用?Python WSGIServer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wsgiref.simple_server.WSGIServer的用法示例。


在下文中一共展示了WSGIServer.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, machine_id, host, port, ui):
     self.machine_id = machine_id
     WSGIServer.__init__(self, (host, port), WSGIRequestHandler)
     self.set_app(self.wsgi_app)
     Partner.__init__(self, ui)
     self.text_format = XMLFormat()
     self.stopped = False
     self.sessions = {} # {session_token: session}
     self.session_token_for_user = {} # {user_name: session_token}
开发者ID:bartosh,项目名称:pomni,代码行数:11,代码来源:server.py

示例2: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        WSGIServer.__init__(self, *args, **kwargs)

        # NonBlockingClient -> timestamp
        self.clients = {}
        # Number of simultaneous clients.
        self.limit = 1000
        # Number of seconds before we bounce idle clients.
        self.timeout = 60
        self._shutdown_event = threading.Event()
开发者ID:jesseward,项目名称:stagehand,代码行数:12,代码来源:wsgi.py

示例3: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
    def __init__(self, server_address, HandlerClass):
        WSGIServer.__init__(self, server_address, HandlerClass)
        if self.cert_file:
            ctx = SSL.Context(SSL.SSLv3_METHOD)
            ctx.use_privatekey_file(self.cert_file)
            ctx.use_certificate_file(self.cert_file)

            self.socket = SSL.Connection(ctx, socket.socket(self.address_family,
                                                            self.socket_type))
            self.server_bind()
            self.server_activate()
开发者ID:LittleForker,项目名称:ajenti,代码行数:13,代码来源:standalone.py

示例4: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     for (k, d) in (('address_family', AF_INET), ('wsgi_env', {})):
         setattr(self, k, kwargs.pop(k, d))
     WSGIServer.__init__(self, *args, **kwargs)
开发者ID:dpavlos,项目名称:elkarmor,代码行数:6,代码来源:http.py

示例5: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
	def __init__(self, server_address, app = None, RequestHandlerClass = WSGIRequestHandler):
		_WSGIServer.__init__(self, server_address, RequestHandlerClass)
		self.set_app(app)
开发者ID:tubav,项目名称:OpenTeagle_API,代码行数:5,代码来源:__init__.py

示例6: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     WSGIServer.__init__(self, *args, **kwargs)
     SimpleXMLRPCDispatcher.__init__(self, False, None)
开发者ID:cherkf,项目名称:pony-build,代码行数:5,代码来源:server.py

示例7: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, thread_count=None, *args, **kwargs):
     '''If 'thread_count' == None, we'll use multiprocessing.cpu_count() threads.'''
     WSGIServer.__init__(self, *args, **kwargs)
     self.thread_count = thread_count
     self.pool = multiprocessing.pool.ThreadPool(self.thread_count)
开发者ID:DarkDare,项目名称:mtwsgi,代码行数:7,代码来源:mtwsgi.py

示例8: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, family, address, handler):
     self.address_family = family
     if family == socket.AF_UNIX:
         self.csize = struct.calcsize('3i')
         self.get_request = self.get_unix_request
     WSGIServer.__init__(self, address, handler)
开发者ID:svinota,项目名称:pyrouted,代码行数:8,代码来源:http.py

示例9: __init__

# 需要导入模块: from wsgiref.simple_server import WSGIServer [as 别名]
# 或者: from wsgiref.simple_server.WSGIServer import __init__ [as 别名]
 def __init__(self, host, port, buffers):
     WSGIServer.__init__(self, (host, port), WSGIRequestHandler)
     self.buffers = buffers
     self.set_app(self.main)
开发者ID:bonventre,项目名称:snotstream-root,代码行数:6,代码来源:jsonserver.py


注:本文中的wsgiref.simple_server.WSGIServer.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。