def __init__(self, *args, **kwargs):
    'This is just like the standard WSGIServer __init__, except with a\n        few additional ``kwargs``:\n\n        :param resource: The URL which has to be identified as a\n            socket.io request.  Defaults to the /socket.io/ URL.\n\n        :param transports: Optional list of transports to allow. List of\n            strings, each string should be one of\n            handler.SocketIOHandler.handler_types.\n\n        :param policy_server: Boolean describing whether or not to use the\n            Flash policy server.  Default True.\n\n        :param policy_listener: A tuple containing (host, port) for the\n            policy server.  This is optional and used only if policy server\n            is set to true.  The default value is 0.0.0.0:843\n\n        :param heartbeat_interval: int The timeout for the server, we\n            should receive a heartbeat from the client within this\n            interval. This should be less than the\n            ``heartbeat_timeout``.\n\n        :param heartbeat_timeout: int The timeout for the client when\n            it should send a new heartbeat to the server. This value\n            is sent to the client after a successful handshake.\n\n        :param close_timeout: int The timeout for the client, when it\n            closes the connection it still X amounts of seconds to do\n            re open of the connection. This value is sent to the\n            client after a successful handshake.\n\n        :param log_file: str The file in which you want the PyWSGI\n            server to write its access log.  If not specified, it\n            is sent to `stderr` (with gevent 0.13).\n\n        '
    self.sockets = {}
    if ('namespace' in kwargs):
        print('DEPRECATION WARNING: use resource instead of namespace')
        self.resource = kwargs.pop('namespace', 'socket.io')
    else:
        self.resource = kwargs.pop('resource', 'socket.io')
    self.transports = kwargs.pop('transports', None)
    if kwargs.pop('policy_server', True):
        wsock = args[0]
        try:
            (address, port) = wsock.getsockname()
        except AttributeError:
            try:
                address = wsock[0]
            except TypeError:
                try:
                    address = wsock.address[0]
                except AttributeError:
                    address = wsock.cfg_addr[0]
        policylistener = kwargs.pop('policy_listener', (address, 10843))
        self.policy_server = FlashPolicyServer(policylistener)
    else:
        self.policy_server = None
    self.config = {'heartbeat_timeout': 60, 'close_timeout': 60, 'heartbeat_interval': 25}
    for f in ('heartbeat_timeout', 'heartbeat_interval', 'close_timeout'):
        if (f in kwargs):
            self.config[f] = int(kwargs.pop(f))
    if (not ('handler_class' in kwargs)):
        kwargs['handler_class'] = SocketIOHandler
    if (not ('ws_handler_class' in kwargs)):
        self.ws_handler_class = WebSocketHandler
    else:
        self.ws_handler_class = kwargs.pop('ws_handler_class')
    log_file = kwargs.pop('log_file', None)
    if log_file:
        kwargs['log'] = open(log_file, 'a')
    super(SocketIOServer, self).__init__(*args, **kwargs)
This is just like the standard WSGIServer __init__, except with a
few additional ``kwargs``:

:param resource: The URL which has to be identified as a
    socket.io request.  Defaults to the /socket.io/ URL.

:param transports: Optional list of transports to allow. List of
    strings, each string should be one of
    handler.SocketIOHandler.handler_types.

:param policy_server: Boolean describing whether or not to use the
    Flash policy server.  Default True.

:param policy_listener: A tuple containing (host, port) for the
    policy server.  This is optional and used only if policy server
    is set to true.  The default value is 0.0.0.0:843

:param heartbeat_interval: int The timeout for the server, we
    should receive a heartbeat from the client within this
    interval. This should be less than the
    ``heartbeat_timeout``.

:param heartbeat_timeout: int The timeout for the client when
    it should send a new heartbeat to the server. This value
    is sent to the client after a successful handshake.

:param close_timeout: int The timeout for the client, when it
    closes the connection it still X amounts of seconds to do
    re open of the connection. This value is sent to the
    client after a successful handshake.

:param log_file: str The file in which you want the PyWSGI
    server to write its access log.  If not specified, it
    is sent to `stderr` (with gevent 0.13).
def __init__(self, *args, **kwargs):
    'This is just like the standard WSGIServer __init__, except with a\n        few additional ``kwargs``:\n\n        :param resource: The URL which has to be identified as a\n            socket.io request.  Defaults to the /socket.io/ URL.\n\n        :param transports: Optional list of transports to allow. List of\n            strings, each string should be one of\n            handler.SocketIOHandler.handler_types.\n\n        :param policy_server: Boolean describing whether or not to use the\n            Flash policy server.  Default True.\n\n        :param policy_listener: A tuple containing (host, port) for the\n            policy server.  This is optional and used only if policy server\n            is set to true.  The default value is 0.0.0.0:843\n\n        :param heartbeat_interval: int The timeout for the server, we\n            should receive a heartbeat from the client within this\n            interval. This should be less than the\n            ``heartbeat_timeout``.\n\n        :param heartbeat_timeout: int The timeout for the client when\n            it should send a new heartbeat to the server. This value\n            is sent to the client after a successful handshake.\n\n        :param close_timeout: int The timeout for the client, when it\n            closes the connection it still X amounts of seconds to do\n            re open of the connection. This value is sent to the\n            client after a successful handshake.\n\n        :param log_file: str The file in which you want the PyWSGI\n            server to write its access log.  If not specified, it\n            is sent to `stderr` (with gevent 0.13).\n\n        '
    self.sockets = {}
    if ('namespace' in kwargs):
        print('DEPRECATION WARNING: use resource instead of namespace')
        self.resource = kwargs.pop('namespace', 'socket.io')
    else:
        self.resource = kwargs.pop('resource', 'socket.io')
    self.transports = kwargs.pop('transports', None)
    if kwargs.pop('policy_server', True):
        wsock = args[0]
        try:
            (address, port) = wsock.getsockname()
        except AttributeError:
            try:
                address = wsock[0]
            except TypeError:
                try:
                    address = wsock.address[0]
                except AttributeError:
                    address = wsock.cfg_addr[0]
        policylistener = kwargs.pop('policy_listener', (address, 10843))
        self.policy_server = FlashPolicyServer(policylistener)
    else:
        self.policy_server = None
    self.config = {'heartbeat_timeout': 60, 'close_timeout': 60, 'heartbeat_interval': 25}
    for f in ('heartbeat_timeout', 'heartbeat_interval', 'close_timeout'):
        if (f in kwargs):
            self.config[f] = int(kwargs.pop(f))
    if (not ('handler_class' in kwargs)):
        kwargs['handler_class'] = SocketIOHandler
    if (not ('ws_handler_class' in kwargs)):
        self.ws_handler_class = WebSocketHandler
    else:
        self.ws_handler_class = kwargs.pop('ws_handler_class')
    log_file = kwargs.pop('log_file', None)
    if log_file:
        kwargs['log'] = open(log_file, 'a')
    super(SocketIOServer, self).__init__(*args, **kwargs)