Update for Net-TS Asio (API Change):

fix #769

The following classes are removed:

* handler_type
* async_result
* async_completion
* is_dynamic_buffer
* is_const_buffer_sequence
* is_mutable_buffer_sequence
* handler_alloc

Actions Required:

* Use BOOST_ASIO_HANDLER_TYPE instead of handler_type
* Use BOOST_ASIO_INITFN_RESULT_TYPE instead of async_result
* Use boost::asio::async_completion
* Use boost::asio::is_dynamic_buffer
* Use boost::asio::is_const_buffer_sequence
* Use boost::asio::is_mutable_buffer_sequence
* boost::asio::associated_allocator_t replaces handler_alloc
This commit is contained in:
Vinnie Falco
2017-09-07 07:39:52 -07:00
parent 9dc9ca13b9
commit 3a28e999af
173 changed files with 3214 additions and 4138 deletions

View File

@@ -47,8 +47,8 @@ int main(int argc, char** argv)
auto const port = argv[2];
auto const text = argv[3];
// The io_service is required for all I/O
boost::asio::io_service ios;
// The io_context is required for all I/O
boost::asio::io_context ioc;
// The SSL context is required, and holds certificates
ssl::context ctx{ssl::context::sslv23_client};
@@ -57,14 +57,14 @@ int main(int argc, char** argv)
load_root_certificates(ctx);
// These objects perform our I/O
tcp::resolver resolver{ios};
websocket::stream<ssl::stream<tcp::socket>> ws{ios, ctx};
tcp::resolver resolver{ioc};
websocket::stream<ssl::stream<tcp::socket>> ws{ioc, ctx};
// Look up the domain name
auto const lookup = resolver.resolve({host, port});
auto const results = resolver.resolve(host, port);
// Make the connection on the IP address we get from a lookup
boost::asio::connect(ws.next_layer().next_layer(), lookup);
boost::asio::connect(ws.next_layer().next_layer(), results.begin(), results.end());
// Perform the SSL handshake
ws.next_layer().handshake(ssl::stream_base::client);