Deployed dbfe310 with MkDocs version: 1.1.2

This commit is contained in:
2021-03-27 06:56:04 +00:00
parent 4884fd205e
commit a7893472a2
5 changed files with 16 additions and 17 deletions

View File

@ -261,5 +261,5 @@ webSocket.send("hello world");
<!--
MkDocs version : 1.1.2
Build Date UTC : 2021-03-25 18:12:11.867518+00:00
Build Date UTC : 2021-03-27 06:56:04.779434+00:00
-->

File diff suppressed because one or more lines are too long

View File

@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-03-25</lastmod>
<lastmod>2021-03-27</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

View File

@ -432,13 +432,10 @@ server.wait();
// Bound host name, max connections and listen backlog can also be passed in as parameters.
ix::WebSocketServer server(port);
server.setOnClientMessageCallback(std::shared_ptr&lt;ConnectionState&gt; connectionState,
WebSocket&amp; webSocket,
const WebSocketMessagePtr&amp; msg)
{
server.setOnClientMessageCallback([](std::shared_ptr&lt;ix::ConnectionState&gt; connectionState, ix::WebSocket &amp; webSocket, const ix::WebSocketMessagePtr &amp; msg) {
// The ConnectionState object contains information about the connection,
// at this point only the client ip address and the port.
std::cout &lt;&lt; &quot;Remote ip: &quot; &lt;&lt; connectionState-&gt;getRemoteIp();
std::cout &lt;&lt; &quot;Remote ip: &quot; &lt;&lt; connectionState-&gt;getRemoteIp() &lt;&lt; std::endl;
if (msg-&gt;type == ix::WebSocketMessageType::Open)
{
@ -456,7 +453,7 @@ server.setOnClientMessageCallback(std::shared_ptr&lt;ConnectionState&gt; connect
std::cout &lt;&lt; &quot;Headers:&quot; &lt;&lt; std::endl;
for (auto it : msg-&gt;openInfo.headers)
{
std::cout &lt;&lt; it.first &lt;&lt; &quot;: &quot; &lt;&lt; it.second &lt;&lt; std::endl;
std::cout &lt;&lt; &quot;\t&quot; &lt;&lt; it.first &lt;&lt; &quot;: &quot; &lt;&lt; it.second &lt;&lt; std::endl;
}
}
else if (msg-&gt;type == ix::WebSocketMessageType::Message)
@ -465,9 +462,11 @@ server.setOnClientMessageCallback(std::shared_ptr&lt;ConnectionState&gt; connect
// All connected clients are available in an std::set. See the broadcast cpp example.
// Second parameter tells whether we are sending the message in binary or text mode.
// Here we send it in the same mode as it was received.
std::cout &lt;&lt; &quot;Received: &quot; &lt;&lt; msg-&gt;str &lt;&lt; std::endl;
webSocket.send(msg-&gt;str, msg-&gt;binary);
}
);
});
auto res = server.listen();
if (!res.first)