Example #1
0
 def run(client, data):
     random.seed()
     yield sleep_async(15 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Example #2
0
 def run(client, data):
     random.seed()
     yield sleep_async(3 + random.randint(0, 5))
     client.send('Reply to %s' % client.id)
Example #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)
Example #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)