def starttls(self, callback=None, **options):

        ## Delay starttls until the write-buffer is emptied.
        if self._wb:
            self._write_callback = partial(self.starttls, callback, **options)
            return

        def success(socket):
            self.socket = socket
            self.io.add_handler(socket.fileno(), self._handle, self._state)
            callback and callback()

        def failure(socket):
            self.socket = socket
            self.close()

        ## Wrap the socket; give startttls() control until the
        ## handshake is finished.
        aio.starttls(self.socket, success, failure, self.io, **options)

        ## Temporarily set this to None so _handle() doesn't
        ## self.io.update_handler()
        self.socket = None
value -- a value to read from for stringio
dataset/ETHPy150Open HenryHu/pybbs/xmpp/readstream.py/ReadStream.starttls--crossover with--dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/SublimeEvernote/lib/thrift/transport/TTransport.py/TMemoryBuffer.__init__