'Send a prefixed string to the other end of the connection.
@param string: The string to send.  The necessary framing (length
prefix, etc) will be added.
@type string: C{bytes}'

def sendString(self, string):

    if (len(string) >= (2 ** (8 * self.prefixLength))):
        raise StringTooLongError(('Try    to    send    %s    bytes    whereas    maximum    is    %s' % (len(string), (2 ** (8 * self.prefixLength)))))
    self.transport.write((pack(self.structFormat, len(string)) + string))
