Deployed bab2295 with MkDocs version: 1.0.4
This commit is contained in:
1 parent
12d32c7cfc
commit
c0410e43aa
6 files changed
+78
-8
No files matched your search
@@ -91,6 +91,15 @@
|
|||||||
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
||||||
<ul class="nav bs-sidenav">
|
<ul class="nav bs-sidenav">
|
||||||
<li class="main active"><a href="#changelog">Changelog</a></li>
|
<li class="main active"><a href="#changelog">Changelog</a></li>
|
||||||
|
<li><a href="#700-2019-10-01">[7.0.0] - 2019-10-01</a></li>
|
||||||
|
<li><a href="#634-2019-09-30">[6.3.4] - 2019-09-30</a></li>
|
||||||
|
<li><a href="#633-2019-09-30">[6.3.3] - 2019-09-30</a></li>
|
||||||
|
<li><a href="#632-2019-09-29">[6.3.2] - 2019-09-29</a></li>
|
||||||
|
<li><a href="#631-2019-09-29">[6.3.1] - 2019-09-29</a></li>
|
||||||
|
<li><a href="#630-2019-09-28">[6.3.0] - 2019-09-28</a></li>
|
||||||
|
<li><a href="#629-2019-09-27">[6.2.9] - 2019-09-27</a></li>
|
||||||
|
<li><a href="#628-2019-09-26">[6.2.8] - 2019-09-26</a></li>
|
||||||
|
<li><a href="#627-2019-09-25">[6.2.7] - 2019-09-25</a></li>
|
||||||
<li><a href="#626-2019-09-24">[6.2.6] - 2019-09-24</a></li>
|
<li><a href="#626-2019-09-24">[6.2.6] - 2019-09-24</a></li>
|
||||||
<li><a href="#625-2019-09-23">[6.2.5] - 2019-09-23</a></li>
|
<li><a href="#625-2019-09-23">[6.2.5] - 2019-09-23</a></li>
|
||||||
<li><a href="#624-2019-09-22">[6.2.4] - 2019-09-22</a></li>
|
<li><a href="#624-2019-09-22">[6.2.4] - 2019-09-22</a></li>
|
||||||
@@ -130,6 +139,45 @@
|
|||||||
|
|
||||||
<h1 id="changelog">Changelog</h1>
|
<h1 id="changelog">Changelog</h1>
|
||||||
<p>All notable changes to this project will be documented in this file.</p>
|
<p>All notable changes to this project will be documented in this file.</p>
|
||||||
|
<h2 id="700-2019-10-01">[7.0.0] - 2019-10-01</h2>
|
||||||
|
<ul>
|
||||||
|
<li>TLS support in server code, only implemented for the OpenSSL SSL backend for now.</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="634-2019-09-30">[6.3.4] - 2019-09-30</h2>
|
||||||
|
<ul>
|
||||||
|
<li>all ws subcommands propagate tls options to servers (unimplemented) or ws or http client (implemented) (contributed by Matt DeBoer)</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="633-2019-09-30">[6.3.3] - 2019-09-30</h2>
|
||||||
|
<ul>
|
||||||
|
<li>ws has a --version option</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="632-2019-09-29">[6.3.2] - 2019-09-29</h2>
|
||||||
|
<ul>
|
||||||
|
<li>(http + websocket clients) can specify cacert and some other tls options (not implemented on all backend). This makes it so that server certs can finally be validated on windows.</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="631-2019-09-29">[6.3.1] - 2019-09-29</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Add ability to use OpenSSL on apple platforms.</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="630-2019-09-28">[6.3.0] - 2019-09-28</h2>
|
||||||
|
<ul>
|
||||||
|
<li>ixcobra / fix crash in CobraConnection::publishNext when the queue is empty + handle CobraConnection_PublishMode_Batch in CobraMetricsThreadedPublisher</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="629-2019-09-27">[6.2.9] - 2019-09-27</h2>
|
||||||
|
<ul>
|
||||||
|
<li>mbedtls fixes / the unittest now pass on macOS, and hopefully will on Windows/AppVeyor as well.</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="628-2019-09-26">[6.2.8] - 2019-09-26</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Http server: add options to ws https to redirect all requests to a given url. POST requests will get a 200 and an empty response.</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code>ws httpd -L --redirect_url https://www.google.com
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2 id="627-2019-09-25">[6.2.7] - 2019-09-25</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Stop having ws send subcommand send a binary message in text mode, which would cause error in <code>make ws_test</code> shell script test.</li>
|
||||||
|
</ul>
|
||||||
<h2 id="626-2019-09-24">[6.2.6] - 2019-09-24</h2>
|
<h2 id="626-2019-09-24">[6.2.6] - 2019-09-24</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad).</li>
|
<li>Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad).</li>
|
||||||
|
|||||||
+1
-1
@@ -219,5 +219,5 @@ webSocket.send("hello world");
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 1.0.4
|
MkDocs version : 1.0.4
|
||||||
Build Date UTC : 2019-09-24 22:43:22
|
Build Date UTC : 2019-10-08 20:47:23
|
||||||
-->
|
-->
|
||||||
@@ -1 +1 @@
|
|||||||
{"config":{"lang":["en"],"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 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.","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","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.","title":"Why another library ?"},{"location":"CHANGELOG/","text":"Changelog All notable changes to this project will be documented in this file. [6.2.6] - 2019-09-24 Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad). [6.2.5] - 2019-09-23 Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env. [6.2.4] - 2019-09-22 Add options to configure TLS ; contributed by Matt DeBoer. Only implemented for OpenSSL TLS backend for now. [6.2.3] - 2019-09-21 Fix crash in the Linux unittest in the HTTP client code, in Socket::readBytes Cobra Metrics Publisher code returns the message id of the message that got published, to be used to validated that it got sent properly when receiving an ack. [6.2.2] - 2019-09-19 In DNS lookup code, make sure the weak pointer we use lives through the expected scope (if branch) [6.2.1] - 2019-09-17 On error while doing a client handshake, additionally display port number next to the host name [6.2.0] - 2019-09-09 websocket and http server: server does not close the bound client socket in many cases imprLine truncated
|
{"config":{"lang":["en"],"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 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.","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","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.","title":"Why another library ?"},{"location":"CHANGELOG/","text":"Changelog All notable changes to this project will be documented in this file. [7.0.0] - 2019-10-01 TLS support in server code, only implemented for the OpenSSL SSL backend for now. [6.3.4] - 2019-09-30 all ws subcommands propagate tls options to servers (unimplemented) or ws or http client (implemented) (contributed by Matt DeBoer) [6.3.3] - 2019-09-30 ws has a --version option [6.3.2] - 2019-09-29 (http + websocket clients) can specify cacert and some other tls options (not implemented on all backend). This makes it so that server certs can finally be validated on windows. [6.3.1] - 2019-09-29 Add ability to use OpenSSL on apple platforms. [6.3.0] - 2019-09-28 ixcobra / fix crash in CobraConnection::publishNext when the queue is empty + handle CobraConnection_PublishMode_Batch in CobraMetricsThreadedPublisher [6.2.9] - 2019-09-27 mbedtls fixes / the unittest now pass on macOS, and hopefully will on Windows/AppVeyor as well. [6.2.8] - 2019-09-26 Http server: add options to ws https to redirect all requests to a given url. POST requests will get a 200 and an empty response. ws httpd -L --redirect_url https://www.google.com [6.2.7] - 2019-09-25 Stop having ws send subcommand send a binary message in text mode, which would cause error iLine truncated
|
||||||
+6
-6
@@ -2,32 +2,32 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-09-24</lastmod>
|
<lastmod>2019-10-08</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
||||||
Binary file not shown.
@@ -293,6 +293,28 @@ Wait time(ms): 10000
|
|||||||
uint32_t m = webSocket.getMaxWaitBetweenReconnectionRetries();
|
uint32_t m = webSocket.getMaxWaitBetweenReconnectionRetries();
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
<h3 id="tls-support-and-configuration">TLS support and configuration</h3>
|
||||||
|
<p>To leverage TLS features, the library must be compiled with the option <code>USE_TLS=1</code>.</p>
|
||||||
|
<p>Then, secure sockets are automatically used when connecting to a <code>wss://*</code> url.</p>
|
||||||
|
<p>Additional TLS options can be configured by passing a <code>ix::SocketTLSOptions</code> instance to the
|
||||||
|
<code>setTLSOptions</code> on <code>ix::WebSocket</code> (or <code>ix::WebSocketServer</code> or <code>ix::HttpServer</code>)</p>
|
||||||
|
<pre><code>webSocket.setTLSOptions({
|
||||||
|
.certFile = "path/to/cert/file.pem",
|
||||||
|
.keyFile = "path/to/key/file.pem",
|
||||||
|
.caFile = "path/to/trust/bundle/file.pem"
|
||||||
|
});
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Specifying <code>certFile</code> and <code>keyFile</code> configures the certificate that will be used to communicate with TLS peers.</p>
|
||||||
|
<p>On a client, this is only necessary for connecting to servers that require a client certificate.</p>
|
||||||
|
<p>On a server, this is necessary for TLS support.</p>
|
||||||
|
<p>Specifying <code>caFile</code> configures the trusted roots bundle file (in PEM format) that will be used to verify peer certificates.
|
||||||
|
- The special value of <code>SYSTEM</code> (the default) indicates that the system-configured trust bundle should be used; this is generally what you want when connecting to any publicly exposed API/server.
|
||||||
|
- The special value of <code>NONE</code> can be used to disable peer verification; this is only recommended to rule out certificate verification when testing connectivity.</p>
|
||||||
|
<p>For a client, specifying <code>caFile</code> can be used if connecting to a server that uses a self-signed cert, or when using a custom CA in an internal environment.</p>
|
||||||
|
<p>For a server, specifying <code>caFile</code> implies that:
|
||||||
|
1. You require clients to present a certificate
|
||||||
|
1. It must be signed by one of the trusted roots in the file</p>
|
||||||
<h2 id="websocket-server-api">WebSocket server API</h2>
|
<h2 id="websocket-server-api">WebSocket server API</h2>
|
||||||
<pre><code>#include <ixwebsocket/IXWebSocketServer.h>
|
<pre><code>#include <ixwebsocket/IXWebSocketServer.h>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user