| 74 | } |
| 75 | |
| 76 | void handshake() |
| 77 | { |
| 78 | socket_.async_handshake(boost::asio::ssl::stream_base::client, |
| 79 | [this](const boost::system::error_code& error) |
| 80 | { |
| 81 | if (!error) |
| 82 | { |
| 83 | send_request(); |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | std::cout << "Handshake failed: " << error.message() << "\n"; |
| 88 | } |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | void send_request() |
| 93 | { |