Ejemplo n.º 1
0
def sendAuth(ws):
    momoid = random.randint(1, 1000)
    msg = PackArgument()
    json = '{"token":"%s"}' % (momoid)
    print json
    msg.append(json)
    buff = initPack(2, 1, msg.content)
    ws.send(buff)
Ejemplo n.º 2
0
def sendPing(ws):
    msg = PackArgument()
    msg.append('{}')
    buff = initPack(1, 1, msg.content)
    ws.send(buff)
Ejemplo n.º 3
0
def sendMatchRoom(ws):
    msg = PackArgument()
    msg.append('{"roomType":3}')
    buff = initPack(3, 4, msg.content)
    ws.send(buff)
Ejemplo n.º 4
0
def sendWolfKill(ws):
    msg = PackArgument()
    msg.append('{"op":1,"slot":%d}' % aliveSeat[-1])
    buff = initPack(4, 6, msg.content)
    ws.send(buff)
Ejemplo n.º 5
0
def sendStartGame(ws):
    msg = PackArgument()
    msg.append('{}')
    buff = initPack(4, 5, msg.content)
    ws.send(buff)
Ejemplo n.º 6
0
def sendpassLastWords(ws):
    msg = PackArgument()
    msg.append('{}')
    buff = initPack(4, 22, msg.content)
    ws.send(buff)
Ejemplo n.º 7
0
def sendDayPass(ws):
    msg = PackArgument()
    msg.append('{}')
    buff = initPack(4, 16, msg.content)
    ws.send(buff)
Ejemplo n.º 8
0
def sendReady(ws):
    msg = PackArgument()
    msg.append('{"op":2}')
    buff = initPack(4, 19, msg.content)
    ws.send(buff)