@@ -0,0 +1,1175 @@
+#coding=utf8%0A%0Afrom gevent import monkey%0Amonkey.patch_all()%0A%0Afrom flask import Flask, render_template, session, request%0Afrom flask.ext.socketio import SocketIO, emit, join_room, leave_room, %5C%0A    close_room, disconnect%0A%0Adef create_socketio(app):%0A    app.debug = True%0A    app.config%5B'SECRET_KEY'%5D = 'secret!'%0A    socketio = SocketIO(app)%0A%0A    @socketio.on('subscribe', namespace='/remote')%0A    def subscribe(message):%0A        join_room(message%5B'channel'%5D)%0A        emit('confirm', message, room=message%5B'channel'%5D)%0A%0A    @socketio.on('publish', namespace='/remote')%0A    def publish(message):%0A        emit('slidechanged', message, room=message%5B'channel'%5D)%0A        emit('confirm', message, room=message%5B'channel'%5D)%0A%0A    @socketio.on('unsubscribe', namespace='/remote')%0A    def unsubscribe(message):%0A        leave_room(message%5B'channel'%5D)%0A%0A    @socketio.on('connect', namespace='/remote')%0A    def connect():%0A        emit('confirm', %7B'conn': 'conn'%7D)%0A%0A    @socketio.on('disconnect', namespace='/remote')%0A    def disconnect():%0A        pass%0A%0A    return socketio%0A%0Aif __name__ == '__main__':%0A    app = Flask(__name__)%0A    socketio = create_socketio(app)%0A    socketio.run(app, port=5001)%0A

Create remote server.