def _raw_write(self):
data_available = libssl.BIO_ctrl_pending(self._wbio)<EOL>if data_available == <NUM_LIT:0>:<EOL><INDENT>return b'<STR_LIT>'<EOL><DEDENT>to_read = min(self._buffer_size, data_available)<EOL>read = libssl.BIO_read(self._wbio, self._bio_write_buffer, to_read)<EOL>to_write = bytes_from_buffer(self._bio_write_buffer, read)<EOL>output = to_write<EOL>while len(to_write):<EOL><INDENT>raise_disconnect = False<EOL>try:<EOL><INDENT>sent = self._socket.send(to_write)<EOL><DEDENT>except (socket_.error) as e:<EOL><INDENT>if e.errno == <NUM_LIT> or e.errno == <NUM_LIT:32>:<EOL><INDENT>raise_disconnect = True<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>if raise_disconnect:<EOL><INDENT>raise_disconnection()<EOL><DEDENT>to_write = to_write[sent:]<EOL>if len(to_write):<EOL><INDENT>self.select_write()<EOL><DEDENT><DEDENT>return output<EOL>
Takes ciphertext from the memory bio and writes it to the
socket.

:return:
    A byte string of ciphertext going to the socket. Used
    for debugging the handshake only.