本文整理汇总了Python中SocketServer.UnixStreamServer方法的典型用法代码示例。如果您正苦于以下问题:Python SocketServer.UnixStreamServer方法的具体用法?Python SocketServer.UnixStreamServer怎么用?Python SocketServer.UnixStreamServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocketServer
的用法示例。
在下文中一共展示了SocketServer.UnixStreamServer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import SocketServer [as 别名]
# 或者: from SocketServer import UnixStreamServer [as 别名]
def __init__(self, addr = 8000,
RequestHandler = SOAPRequestHandler, log = 0, encoding = 'UTF-8',
config = Config, namespace = None, ssl_context = None):
# Test the encoding, raising an exception if it's not known
if encoding != None:
''.encode(encoding)
if ssl_context != None and not config.SSLserver:
raise AttributeError, \
"SSL server not supported by this Python installation"
self.namespace = namespace
self.objmap = {}
self.funcmap = {}
self.ssl_context = ssl_context
self.encoding = encoding
self.config = config
self.log = log
self.allow_reuse_address= 1
SocketServer.UnixStreamServer.__init__(self, str(addr), RequestHandler)
示例2: test_UnixStreamServer
# 需要导入模块: import SocketServer [as 别名]
# 或者: from SocketServer import UnixStreamServer [as 别名]
def test_UnixStreamServer(self):
self.run_server(SocketServer.UnixStreamServer,
SocketServer.StreamRequestHandler,
self.stream_examine)
示例3: test_UnixStreamServer
# 需要导入模块: import SocketServer [as 别名]
# 或者: from SocketServer import UnixStreamServer [as 别名]
def test_UnixStreamServer(self):
self.run_server(SocketServer.UnixStreamServer,
SocketServer.StreamRequestHandler,
self.stream_examine)
示例4: __init__
# 需要导入模块: import SocketServer [as 别名]
# 或者: from SocketServer import UnixStreamServer [as 别名]
def __init__(self, *args, **kwargs):
self.logger = create_logger(kwargs.pop('logger', None))
self.tunnel_ok = queue.Queue()
UnixStreamServer.__init__(self, *args, **kwargs)