コード例 #1
0
ファイル: chat.py プロジェクト: urielka/shaveet
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})
コード例 #2
0
ファイル: chat.py プロジェクト: yuvadm/shaveet
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})
コード例 #3
0
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})