Beispiel #1
0
 def run(client, data):
     random.seed()
     yield sleep_async(15 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Beispiel #2
0
 def run(client, data):
     random.seed()
     yield sleep_async(3 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Beispiel #3
0
 def run(client, data):
     d = json.loads(data)
     for i in range(3):
         print "%d: Got %s from [%s]" % (i, d['message'], client.id)
         yield sleep_async(1)
Beispiel #4
0
 def run(client, data):
     d = json.loads(data)
     for i in range(3):
         print "%d: Got %s from [%s]" % (i, d['message'], client.id)
         yield sleep_async(1)