def handle_write(self):
        """get a PDU from the queue and send it."""
        if _debug: deferred(UDPDirector._debug, "handle_write")

        try:
            pdu = self.request.get()

            sent = self.socket.sendto(pdu.pduData, pdu.pduDestination)
            if _debug: deferred(UDPDirector._debug, "    - sent %d octets to %s", sent, pdu.pduDestination)

        except __HOLE__ as err:
            deferred(UDPDirector._error, "handle_write socket error: %s", err)
dataset/ETHPy150Open JoelBender/bacpypes/py34/bacpypes/udp.py/UDPDirector.handle_write