Deployed dbfe310 with MkDocs version: 1.1.2
This commit is contained in:
parent
4884fd205e
commit
a7893472a2
@ -261,5 +261,5 @@ webSocket.send("hello world");
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 1.1.2
|
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
16
sitemap.xml
16
sitemap.xml
@ -1,35 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2021-03-25</lastmod>
|
<lastmod>2021-03-27</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
@ -432,13 +432,10 @@ server.wait();
|
|||||||
// Bound host name, max connections and listen backlog can also be passed in as parameters.
|
// Bound host name, max connections and listen backlog can also be passed in as parameters.
|
||||||
ix::WebSocketServer server(port);
|
ix::WebSocketServer server(port);
|
||||||
|
|
||||||
server.setOnClientMessageCallback(std::shared_ptr<ConnectionState> connectionState,
|
server.setOnClientMessageCallback([](std::shared_ptr<ix::ConnectionState> connectionState, ix::WebSocket & webSocket, const ix::WebSocketMessagePtr & msg) {
|
||||||
WebSocket& webSocket,
|
|
||||||
const WebSocketMessagePtr& msg)
|
|
||||||
{
|
|
||||||
// The ConnectionState object contains information about the connection,
|
// The ConnectionState object contains information about the connection,
|
||||||
// at this point only the client ip address and the port.
|
// at this point only the client ip address and the port.
|
||||||
std::cout << "Remote ip: " << connectionState->getRemoteIp();
|
std::cout << "Remote ip: " << connectionState->getRemoteIp() << std::endl;
|
||||||
|
|
||||||
if (msg->type == ix::WebSocketMessageType::Open)
|
if (msg->type == ix::WebSocketMessageType::Open)
|
||||||
{
|
{
|
||||||
@ -456,7 +453,7 @@ server.setOnClientMessageCallback(std::shared_ptr<ConnectionState> connect
|
|||||||
std::cout << "Headers:" << std::endl;
|
std::cout << "Headers:" << std::endl;
|
||||||
for (auto it : msg->openInfo.headers)
|
for (auto it : msg->openInfo.headers)
|
||||||
{
|
{
|
||||||
std::cout << it.first << ": " << it.second << std::endl;
|
std::cout << "\t" << it.first << ": " << it.second << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (msg->type == ix::WebSocketMessageType::Message)
|
else if (msg->type == ix::WebSocketMessageType::Message)
|
||||||
@ -465,9 +462,11 @@ server.setOnClientMessageCallback(std::shared_ptr<ConnectionState> connect
|
|||||||
// All connected clients are available in an std::set. See the broadcast cpp example.
|
// 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.
|
// 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.
|
// Here we send it in the same mode as it was received.
|
||||||
|
std::cout << "Received: " << msg->str << std::endl;
|
||||||
|
|
||||||
webSocket.send(msg->str, msg->binary);
|
webSocket.send(msg->str, msg->binary);
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
|
||||||
auto res = server.listen();
|
auto res = server.listen();
|
||||||
if (!res.first)
|
if (!res.first)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user