| 436 | } |
| 437 | |
| 438 | bool http_aclient::handle_ssl_handshake() |
| 439 | { |
| 440 | // �������ǵ�һ�ν��� SSL ���ֽε� IO ���� |
| 441 | sslbase_io* ssl_io = (sslbase_io*) conn_->get_hook(); |
| 442 | if (ssl_io == NULL) { |
| 443 | logger_error("no ssl_io hooked!"); |
| 444 | return false; |
| 445 | } |
| 446 | |
| 447 | if (!ssl_io->handshake()) { |
| 448 | logger_error("ssl handshake error!"); |
| 449 | return false; |
| 450 | } |
| 451 | |
| 452 | // SSL ���ֳɹ��ص����ӳɹ�������֪ͨ������Է����������� |
| 453 | if (ssl_io->handshake_ok()) { |
| 454 | conn_->del_read_callback(this); |
| 455 | conn_->disable_read(); |
| 456 | return this->on_connect(); |
| 457 | } |
| 458 | |
| 459 | // ���� SSL ���ֹ��� |
| 460 | return true; |
| 461 | } |
| 462 | |
| 463 | bool http_aclient::read_callback(char* data, int len) |
| 464 | { |
nothing calls this directly
no test coverage detected