Deployed f090c76 with MkDocs version: 1.1.2
This commit is contained in:
committed
1 parent
4d51179819
commit
a65bc2ab16
6 files changed
+25
-10
No files matched your search
@@ -95,6 +95,10 @@
|
||||
|
||||
<li class="nav-item" data-level="1"><a href="#changelog" class="nav-link">Changelog</a>
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item" data-level="2"><a href="#1109-2021-03-07" class="nav-link">[11.0.9] - 2021-03-07</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item" data-level="2"><a href="#1108-2020-12-25" class="nav-link">[11.0.8] - 2020-12-25</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
@@ -1112,6 +1116,8 @@
|
||||
|
||||
<h1 id="changelog">Changelog</h1>
|
||||
<p>All changes to this project will be documented in this file.</p>
|
||||
<h2 id="1109-2021-03-07">[11.0.9] - 2021-03-07</h2>
|
||||
<p>(ixwebsocket) Expose setHandshakeTimeout method</p>
|
||||
<h2 id="1108-2020-12-25">[11.0.8] - 2020-12-25</h2>
|
||||
<p>(ws) trim ws dependencies no more ixcrypto and ixcore deps</p>
|
||||
<h2 id="1107-2020-12-25">[11.0.7] - 2020-12-25</h2>
|
||||
|
||||
+1
-1
@@ -261,5 +261,5 @@ webSocket.send("hello world");
|
||||
|
||||
<!--
|
||||
MkDocs version : 1.1.2
|
||||
Build Date UTC : 2020-12-26 00:26:49.041091+00:00
|
||||
Build Date UTC : 2021-03-08 03:30:07.522308+00:00
|
||||
-->
|
||||
@@ -1 +1 @@
|
||||
{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Introduction WebSocket is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. IXWebSocket is a C++ library for client and server Websocket communication, and for client and server HTTP communication. TLS aka SSL is supported. The code is derived from easywsclient and from the Satori C SDK . It has been tested on the following platforms. macOS iOS Linux Android Windows FreeBSD Example code // Required on Windows ix::initNetSystem(); // Our websocket object ix::WebSocket webSocket; std::string url(\"ws://localhost:8080/\"); webSocket.setUrl(url); // Setup a callback to be fired when a message or an event (open, close, error) is received webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Message) { std::cout << msg->str << std::endl; } } ); // Now that our callback is setup, we can start our background thread and receive messages webSocket.start(); // Send a message to the server (default to TEXT mode) webSocket.send(\"hello world\"); Why another library? There are 2 main reasons that explain why IXWebSocket got written. First, we needed a C++ cross-platform client library, which should have few dependencies. What looked like the most solid one, websocketpp did depend on boost and this was not an option for us. Secondly, there were other available libraries with fewer dependencies (C ones), but they required calling an explicit poll routine periodically to know if a client had received data from a server, which was not elegant. We started by solving those 2 problems, then we added server websocket code, then an HTTP client, and finally a very simple HTTP server. IXWebSocket comes with a command line utility named ws which is quite handy, and is now packaged with alpine linux. You can install it with apk add ws . Few dependencies (only zlib) Simple to use ; uses std::string and std::function callbacks. Complete support of the websocket protocol, and basic http support. Client and Server TLS support Alternative libraries There are plenty of great websocket libraries out there, which might work for you. Here are a couple of serious ones. websocketpp - C++ beast - C++ libwebsockets - C \u00b5WebSockets - C Contributing IXWebSocket is developed on GitHub . We'd love to hear about how you use it; opening up an issue on GitHub is ok for that. If things don't work as expected, please create an issue on GitHub, or even better a pull request if you know how to fix your problem.","title":"Home"},{"location":"#introduction","text":"WebSocket is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. IXWebSocket is a C++ library for client and server Websocket communication, and for client and server HTTP communication. TLS aka SSL is supported. The code is derived from easywsclient and from the Satori C SDK . It has been tested on the following platforms. macOS iOS Linux Android Windows FreeBSD","title":"Introduction"},{"location":"#example-code","text":"// Required on Windows ix::initNetSystem(); // Our websocket object ix::WebSocket webSocket; std::string url(\"ws://localhost:8080/\"); webSocket.setUrl(url); // Setup a callback to be fired when a message or an event (open, close, error) is received webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Message) { std::cout << msg->str << std::endl; } } ); // Now that our callback is setup, we can start our background thread and receive messages webSocket.start(); // Send a message to the server (default to TEXT mode) webSocket.send(\"hello world\");","title":"Example code"},{"location":"#why-another-library","text":"There are 2 main reasons that explain why IXWebSocket got written. First, we needed a C++ cross-platform client library, which should have few dependencies. What looked like the most solid one, websocketpp did depend on boost and this was not an option for us. Secondly, there were other available libraries with fewer dependencies (C ones), but they required calling an explicit poll routine periodically to know if a client had received data from a server, which was not elegant. We started by solving those 2 problems, then we added server websocket code, then an HTTP client, and finally a very simple HTTP server. IXWebSocket comes with a command line utility named ws which is quite handy, and is now packaged with alpine linux. You can install it with apk add ws . Few dependencies (only zlib) Simple to use ; uses std::string and std::function callbacks. Complete support of the websocket protocol, and basic http support. Client and Server TLS support","title":"Why another library?"},{"location":"#alternative-libraries","text":"There are plenty of great websocket liLine truncated
|
||||
{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Introduction WebSocket is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. IXWebSocket is a C++ library for client and server Websocket communication, and for client and server HTTP communication. TLS aka SSL is supported. The code is derived from easywsclient and from the Satori C SDK . It has been tested on the following platforms. macOS iOS Linux Android Windows FreeBSD Example code // Required on Windows ix::initNetSystem(); // Our websocket object ix::WebSocket webSocket; std::string url(\"ws://localhost:8080/\"); webSocket.setUrl(url); // Setup a callback to be fired when a message or an event (open, close, error) is received webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Message) { std::cout << msg->str << std::endl; } } ); // Now that our callback is setup, we can start our background thread and receive messages webSocket.start(); // Send a message to the server (default to TEXT mode) webSocket.send(\"hello world\"); Why another library? There are 2 main reasons that explain why IXWebSocket got written. First, we needed a C++ cross-platform client library, which should have few dependencies. What looked like the most solid one, websocketpp did depend on boost and this was not an option for us. Secondly, there were other available libraries with fewer dependencies (C ones), but they required calling an explicit poll routine periodically to know if a client had received data from a server, which was not elegant. We started by solving those 2 problems, then we added server websocket code, then an HTTP client, and finally a very simple HTTP server. IXWebSocket comes with a command line utility named ws which is quite handy, and is now packaged with alpine linux. You can install it with apk add ws . Few dependencies (only zlib) Simple to use ; uses std::string and std::function callbacks. Complete support of the websocket protocol, and basic http support. Client and Server TLS support Alternative libraries There are plenty of great websocket libraries out there, which might work for you. Here are a couple of serious ones. websocketpp - C++ beast - C++ libwebsockets - C \u00b5WebSockets - C Contributing IXWebSocket is developed on GitHub . We'd love to hear about how you use it; opening up an issue on GitHub is ok for that. If things don't work as expected, please create an issue on GitHub, or even better a pull request if you know how to fix your problem.","title":"Home"},{"location":"#introduction","text":"WebSocket is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. IXWebSocket is a C++ library for client and server Websocket communication, and for client and server HTTP communication. TLS aka SSL is supported. The code is derived from easywsclient and from the Satori C SDK . It has been tested on the following platforms. macOS iOS Linux Android Windows FreeBSD","title":"Introduction"},{"location":"#example-code","text":"// Required on Windows ix::initNetSystem(); // Our websocket object ix::WebSocket webSocket; std::string url(\"ws://localhost:8080/\"); webSocket.setUrl(url); // Setup a callback to be fired when a message or an event (open, close, error) is received webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Message) { std::cout << msg->str << std::endl; } } ); // Now that our callback is setup, we can start our background thread and receive messages webSocket.start(); // Send a message to the server (default to TEXT mode) webSocket.send(\"hello world\");","title":"Example code"},{"location":"#why-another-library","text":"There are 2 main reasons that explain why IXWebSocket got written. First, we needed a C++ cross-platform client library, which should have few dependencies. What looked like the most solid one, websocketpp did depend on boost and this was not an option for us. Secondly, there were other available libraries with fewer dependencies (C ones), but they required calling an explicit poll routine periodically to know if a client had received data from a server, which was not elegant. We started by solving those 2 problems, then we added server websocket code, then an HTTP client, and finally a very simple HTTP server. IXWebSocket comes with a command line utility named ws which is quite handy, and is now packaged with alpine linux. You can install it with apk add ws . Few dependencies (only zlib) Simple to use ; uses std::string and std::function callbacks. Complete support of the websocket protocol, and basic http support. Client and Server TLS support","title":"Why another library?"},{"location":"#alternative-libraries","text":"There are plenty of great websocket liLine truncated
|
||||
+8
-8
@@ -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>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2020-12-26</lastmod>
|
||||
<lastmod>2021-03-08</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
||||
Binary file not shown.
@@ -103,6 +103,10 @@
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item" data-level="2"><a href="#handshake-timeout" class="nav-link">Handshake timeout</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item" data-level="2"><a href="#websocket-server-api" class="nav-link">WebSocket server API</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
@@ -330,6 +334,11 @@ Wait time(ms): 10000
|
||||
<pre><code class="language-cpp">webSocket.setMaxWaitBetweenReconnectionRetries(5 * 1000); // 5000ms = 5s
|
||||
uint32_t m = webSocket.getMaxWaitBetweenReconnectionRetries();
|
||||
</code></pre>
|
||||
<h2 id="handshake-timeout">Handshake timeout</h2>
|
||||
<p>You can control how long to wait until timing out while waiting for the websocket handshake to be performed.</p>
|
||||
<pre><code>int handshakeTimeoutSecs = 1;
|
||||
setHandshakeTimeout(handshakeTimeoutSecs);
|
||||
</code></pre>
|
||||
<h2 id="websocket-server-api">WebSocket server API</h2>
|
||||
<h3 id="legacy-api">Legacy api</h3>
|
||||
<p>This api was actually changed to take a weak_ptr<WebSocket> as the first argument to setOnConnectionCallback ; previously it would take a shared_ptr<WebSocket> which was creating cycles and then memory leaks problems.</p>
|
||||
|
||||
Reference in new issue
Block a user