Deployed d26664f with MkDocs version: 1.1.2

This commit is contained in:
committed 2021-03-23 14:34:32 +00:00
1 parent e7d519fee7
commit b6b8e426a7
5 files changed
+13 -3

No files matched your search

+6
View File
@@ -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="#1113-2021-03-23" class="nav-link">[11.1.3] - 2021-03-23</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#1112-2021-03-22" class="nav-link">[11.1.2] - 2021-03-22</a>
<ul class="nav flex-column">
</ul>
@@ -1128,6 +1132,8 @@
<h1 id="changelog">Changelog</h1>
<p>All changes to this project will be documented in this file.</p>
<h2 id="1113-2021-03-23">[11.1.3] - 2021-03-23</h2>
<p>(ixwebsocket) New option to set the min wait between reconnection attempts. Still default to 1ms. (setMinWaitBetweenReconnectionRetries).</p>
<h2 id="1112-2021-03-22">[11.1.2] - 2021-03-22</h2>
<p>(ws) initialize maxWaitBetweenReconnectionRetries to a non zero value ; a zero value was causing spurious reconnections attempts</p>
<h2 id="1111-2021-03-20">[11.1.1] - 2021-03-20</h2>
+1 -1
View File
@@ -261,5 +261,5 @@ webSocket.send(&quot;hello world&quot;);
<!--
MkDocs version : 1.1.2
Build Date UTC : 2021-03-23 04:10:55.299999+00:00
Build Date UTC : 2021-03-23 14:34:32.028094+00:00
-->
+1 -1
View File
@@ -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
BIN
View File
Binary file not shown.
+5 -1
View File
@@ -330,9 +330,13 @@ Wait time(ms): 6400
#retries: 8
Wait time(ms): 10000
</code></pre>
<p>The waiting time is capped by default at 10s between 2 attempts, but that value can be changed and queried.</p>
<p>The waiting time is capped by default at 10s between 2 attempts, but that value
can be changed and queried. The minimum waiting time can also be set.</p>
<pre><code class="language-cpp">webSocket.setMaxWaitBetweenReconnectionRetries(5 * 1000); // 5000ms = 5s
uint32_t m = webSocket.getMaxWaitBetweenReconnectionRetries();
webSocket.setMinWaitBetweenReconnectionRetries(1000); // 1000ms = 1s
uint32_t m = webSocket.getMinWaitBetweenReconnectionRetries();
</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>