MCPcopy Create free account
hub / github.com/acl-dev/acl / setup_ssl

Method setup_ssl

lib_acl_cpp/samples/ssl/client/main.cpp:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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";

Callers

nothing calls this directly

Calls 4

set_sni_hostMethod · 0.80
createMethod · 0.45
setup_hookMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected