title: Shut down websocket++ connection
body: <p>When using Websocket++ with the ASIO mode, I start my connection with:</p>
  
  <pre><code>boost::shared_ptr&lt;client&gt; x(new client());
  x-&gt;init_asio();
  websocketpp::lib::error_code ec;
  client::connection_pt con = x-&gt;get_connection(url, ec);
  x-&gt;connect(con);
  new thread(boost::bind(&amp;LocalCallbacks::run, x)); // which just runs x-&gt;run()
  </code></pre>
  
  <p>This pattern is copied (with modifications) from the examples provided. How should I cleanup properly when a user presses a button to cancel the websocket? I am currently doing:</p>
  
  <pre><code>x-&gt;stop();
  </code></pre>
  
  <p>Should I also be calling <code>x-&gt;close()</code>? Do I need to wait after calling <code>close</code> before calling <code>stop</code>? Do I need to kill the <code>thread</code> that was created, or will that stop automatically? I have had reports of the current code leaving the websocket session open.</p>