def send_pdu(self, pdu): self.pdu_queue.put({ 'direction': 'outbound', 'pdu': pdu.get_obj(), }) return SmscServer.send_pdu(self, pdu)
def handle_data(self, data): self.pdu_queue.put({ 'direction': 'inbound', 'pdu': unpack_pdu(data), }) return SmscServer.handle_data(self, data)
def __init__(self, delivery_report_string=None): self.pdu_queue = DeferredQueue() SmscServer.__init__(self, delivery_report_string)