Skip to content

Commit

Permalink
Fix custom resource path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekt committed Oct 17, 2015
1 parent 7b15938 commit dd07848
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ class SocketIO(object):
isn't known at the time this class is instantiated, then call
``socketio.init_app(app)`` once the application instance is
available.
:param kwargs: Socket.IO and Engine.IO server options.
The Socket.IO options are detailed below:
:param resource: The SocketIO resource name. Defaults to ``'socket.io'``.
Leave this as is unless you know what you are doing.
:param kwargs: Socket.IO and Engine.IO server options.
The Socket.IO server options are detailed below:
:param client_manager_class: The class that will manage the client list.
The default value is appropriate for most
cases.
Expand All @@ -53,7 +55,7 @@ class SocketIO(object):
functions that are compatible with the standard library
versions.
The Engine.IO configuration supports the following settings:
The Engine.IO server configuration supports the following settings:
:param async_mode: The library used for asynchronous operations. Valid
options are "threading", "eventlet" and "gevent". If
Expand Down Expand Up @@ -97,7 +99,7 @@ def init_app(self, app, **kwargs):
app.extensions['socketio'] = self
self.server_options = kwargs

resource = kwargs.get('resource', 'socket.io')
resource = kwargs.pop('resource', 'socket.io')
if resource.startswith('/'):
resource = resource[1:]
self.server = socketio.Server(**self.server_options)
Expand Down

0 comments on commit dd07848

Please sign in to comment.