'Write some bytes to this connection, passing them through a TLS layer if
necessary, or discarding them if the connection has already been lost.'

def write(self, bytes):

    if self.TLS:
        if self.connected:
            self.protocol.write(bytes)
    else:
        FileDescriptor.write(self, bytes)
