'Send data to the remote end after a connection was established.
The given `data\' is first encapsulated in protocol messages.  Then, the
protocol message(s) are sent over the wire.  The argument `flags\'
specifies the protocol message flags with the default flags signalling
payload.'

def sendRemote(self, data, flags=const.FLAG_PAYLOAD):

    messages = message.createProtocolMessages(data, flags=flags)
    blurb = ''.join([msg.encryptAndHMAC(self.sendCrypter, self.sendHMAC) for msg in messages])
    if const.USE_IAT_OBFUSCATION:
        if (len(self.choppingBuf) == 0):
            self.choppingBuf.write(blurb)
            reactor.callLater(self.iatMorpher.randomSample(), self.flushPieces)
        else:
            self.choppingBuf.write(blurb)
    else:
        padBlurb = self.pktMorpher.getPadding(self.sendCrypter, self.sendHMAC, len(blurb))
        self.circuit.downstream.write((blurb + padBlurb))
