def create_client(): shaveet = ServerProxy("http://localhost:8082") client_id = request.args.get('name') + "_" + str(uuid4()).replace( "-", "") + 'S3CR37' key = shaveet.create_client(client_id)['result'] shaveet.subscribe(client_id, 'chat-room') return dumps({'key': key, 'client_id': client_id})
def create_client(): shaveet = ServerProxy("http://localhost:8082") client_id = request.args.get('name') + "_" + str(uuid4()).replace("-","") + 'S3CR37'; key = shaveet.create_client(client_id)['result'] shaveet.subscribe(client_id,'chat-room') return dumps({'key':key,'client_id':client_id})
def create_client(): shaveet = ServerProxy("http://localhost:8082") client_id = request.args.get('name'); key = shaveet.create_client(client_id)['result'] shaveet.subscribe(client_id,'user-' + client_id) return dumps({'key':key,'client_id':client_id})