| 38 | } |
| 39 | |
| 40 | bool setup_ssl(acl::socket_stream& conn) { |
| 41 | bool non_block = false; |
| 42 | acl::sslbase_io* ssl = ssl_conf_.create(non_block); |
| 43 | |
| 44 | ssl->set_sni_host(addr_); |
| 45 | |
| 46 | // ����ʹ�� SSL ��ʽ����������Ҫ�� SSL IO ������ע�������� |
| 47 | // �����������У����� ssl io �滻 stream ��Ĭ�ϵĵײ� IO ���� |
| 48 | if (conn.setup_hook(ssl) == ssl) { |
| 49 | printf("setup ssl IO hook error!\r\n"); |
| 50 | ssl->destroy(); |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | printf("ssl setup ok!\r\n"); |
| 55 | return true; |
| 56 | } |
| 57 | |
| 58 | void do_echo(acl::socket_stream& conn) { |
| 59 | const char* data = "hello world!\r\n"; |
nothing calls this directly
no test coverage detected