Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2014-08-12 13:36:47 +0400
committereidheim <eidheim@gmail.com>2014-08-12 13:36:47 +0400
commit7c65d798b6e79b865aabf1205d5e5de193bb63f7 (patch)
treea18e07174150954c86f7ef95829786c9f8912571 /client_wss.hpp
parent865c9bff3451ceb02e330d7c003fb13bcd0360c5 (diff)
renamed Connection::streambuf, and cleanup
Diffstat (limited to 'client_wss.hpp')
-rw-r--r--client_wss.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/client_wss.hpp b/client_wss.hpp
index 7a67f0a..4805807 100644
--- a/client_wss.hpp
+++ b/client_wss.hpp
@@ -27,14 +27,15 @@ namespace SimpleWeb {
asio_resolver.async_resolve(query, [this]
(const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator it){
if(!ec) {
- std::shared_ptr<WSS> socket(new WSS(asio_io_service, asio_context));
- boost::asio::async_connect(socket->lowest_layer(), it, [this, socket]
+ connection=std::unique_ptr<Connection>(new Connection(new WSS(asio_io_service, asio_context)));
+
+ boost::asio::async_connect(connection->socket->lowest_layer(), it, [this]
(const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator it){
if(!ec) {
- socket->async_handshake(boost::asio::ssl::stream_base::client,
- [this, socket](const boost::system::error_code& ec) {
+ connection->socket->async_handshake(boost::asio::ssl::stream_base::client,
+ [this](const boost::system::error_code& ec) {
if(!ec)
- handshake(socket);
+ handshake();
else
throw std::invalid_argument(ec.message());
});
@@ -50,5 +51,4 @@ namespace SimpleWeb {
};
}
-#endif /* CLIENT_WSS_HPP */
-
+#endif /* CLIENT_WSS_HPP */ \ No newline at end of file