| 53 | client.addEvent(event) |
| 54 | |
| 55 | class Client(): |
| 56 | def __init__(self, uuid): |
| 57 | self.uuid = uuid |
| 58 | self.lastActive = time() |
| 59 | self.events = [] |
| 60 | |
| 61 | def newEvents(self): |
| 62 | return len(self.events) > 0 |
| 63 | |
| 64 | def popEvent(self): |
| 65 | if not len(self.events): |
| 66 | return None |
| 67 | return self.events.pop(0) |
| 68 | |
| 69 | def addEvent(self, event): |
| 70 | self.events.append(event) |
| 71 | |
| 72 | class UpdateEvent(): |
| 73 | def __init__(self, itype, iid, destination): |