Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SocketIOServer support #245

Closed
wants to merge 2 commits into from
Closed

add SocketIOServer support #245

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 29, 2011

socketio is based on gevent-socketio, so i got issue #212 for running the test case on both the gevent and socketio server.

other than that, it works

@ghost ghost closed this Nov 3, 2011
@ghost
Copy link
Author

ghost commented Nov 3, 2011

the dev version of the socketio server would break under this configuration. I'll send another pull request once its fixed

@ghost ghost reopened this Mar 8, 2012
@ghost
Copy link
Author

ghost commented Mar 8, 2012

ok, socketio is stable again

@ghost ghost closed this Apr 5, 2012
@tarekziade
Copy link

Was this one closed by accident ? I am interested in this feature

@ghost
Copy link
Author

ghost commented May 11, 2012

gevent socketio kept changing their options so i pulled this request. you can still run it with

from bottle import ServerAdapter

class SocketIOServer(ServerAdapter):
    def run(self, handler):                                                                          
        from socketio import SocketIOServer
        from gevent import monkey, local
        if self.options.get('monkey', True):
            if not threading.local is local.local: monkey.patch_all()
        namespace = self.options.get('namespace', 'socket.io')
        policy_server = self.options.get('policy_server', False)
        SocketIOServer((self.host, self.port), handler, namespace=namespace,
                         policy_server=policy_server).serve_forever()

run(server=SocketIOServer)

@tarekziade
Copy link

@ebaum ok thx!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant