'Write the given data as a single datagram.
@param datagram: The data that will make up the complete datagram to be
written.
@type datagram: L{bytes}'

def write(self, datagram):

    try:
        return self._system.write(self._fileno, datagram)
    except IOError as e:
        if (e.errno == errno.EINTR):
            return self.write(datagram)
        raise
