'Send the given datagram.'

def write(self, datagram, addr=None):

    if (addr is None):
        addr = self._connectedTo
    if (addr is None):
        raise ValueError('Need    an    address')
    if (len(datagram) > self._maxPacketSize):
        raise ValueError('Packet    too    big')
    self._sentPackets.append((datagram, addr))
