* �����麯��, ���첽���ӳɹ�����ô˺��� * @return {bool} ���ظ������� true ��ʾ�����������ʾ��Ҫ�ر��첽�� */
| 183 | * @return {bool} ���ظ������� true ��ʾ�����������ʾ��Ҫ�ر��첽�� |
| 184 | */ |
| 185 | bool open_callback() |
| 186 | { |
| 187 | // ���ӳɹ�������IO��д�ص����� |
| 188 | client_->add_read_callback(this); |
| 189 | client_->add_write_callback(this); |
| 190 | ctx_->nopen_total++; |
| 191 | |
| 192 | acl::assert_(id_ > 0); |
| 193 | if (ctx_->nopen_total < ctx_->nopen_limit) { |
| 194 | // ��ʼ������һ�����ӹ��� |
| 195 | if (!connect_server(ssl_conf_, ctx_, id_ + 1)) { |
| 196 | std::cout << "connect error!" << std::endl; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | // ���� SSL ��ʽ |
| 201 | if (ssl_conf_) { |
| 202 | return setup_ssl(*ssl_conf_); |
| 203 | } |
| 204 | |
| 205 | // ��ʼ�����˵Ķ�д���� |
| 206 | else { |
| 207 | return begin_run(); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | private: |
| 212 | acl::aio_socket_stream* client_; |
nothing calls this directly
no test coverage detected