Deployed 8fda7cb with MkDocs version: 1.0.4
This commit is contained in:
1 parent
c880faa5ff
commit
bd01be61d2
6 files changed
+23
-8
No files matched your search
@@ -91,6 +91,7 @@
|
|||||||
<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="#710-2019-10-13">[7.1.0] - 2019-10-13</a></li>
|
||||||
<li><a href="#700-2019-10-01">[7.0.0] - 2019-10-01</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="#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="#633-2019-09-30">[6.3.3] - 2019-09-30</a></li>
|
||||||
@@ -139,6 +140,10 @@
|
|||||||
|
|
||||||
<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="710-2019-10-13">[7.1.0] - 2019-10-13</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Add client support for websocket subprotocol. Look for the new addSubProtocol method for details.</li>
|
||||||
|
</ul>
|
||||||
<h2 id="700-2019-10-01">[7.0.0] - 2019-10-01</h2>
|
<h2 id="700-2019-10-01">[7.0.0] - 2019-10-01</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>TLS support in server code, only implemented for the OpenSSL SSL backend for now.</li>
|
<li>TLS support in server code, only implemented for the OpenSSL SSL backend for now.</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-10-08 21:51:33
|
Build Date UTC : 2019-10-16 18:19:27
|
||||||
-->
|
-->
|
||||||
@@ -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. [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
|
{"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.1.0] - 2019-10-13 Add client support for websocket subprotocol. Look for the new addSubProtocol method for details. [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.googlLine 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-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-10-08</lastmod>
|
<lastmod>2019-10-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
||||||
Binary file not shown.
@@ -258,6 +258,16 @@ headers["foo"] = "bar";
|
|||||||
webSocket.setExtraHeaders(headers);
|
webSocket.setExtraHeaders(headers);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
<h3 id="subprotocols">Subprotocols</h3>
|
||||||
|
<p>You can specify subprotocols to be set during the WebSocket handshake. For more info you can refer to <a href="https://hpbn.co/websocket/#subprotocol-negotiation">this doc</a>.</p>
|
||||||
|
<pre><code>webSocket.addSubprotocol("appProtocol-v1");
|
||||||
|
webSocket.addSubprotocol("appProtocol-v2");
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The protocol that the server did accept is available in the open info <code>protocol</code> field.</p>
|
||||||
|
<pre><code>std::cout << "protocol: " << msg->openInfo.protocol << std::endl;
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h3 id="automatic-reconnection">Automatic reconnection</h3>
|
<h3 id="automatic-reconnection">Automatic reconnection</h3>
|
||||||
<p>Automatic reconnection kicks in when the connection is disconnected without the user consent. This feature is on by default and can be turned off.</p>
|
<p>Automatic reconnection kicks in when the connection is disconnected without the user consent. This feature is on by default and can be turned off.</p>
|
||||||
<pre><code>webSocket.enableAutomaticReconnection(); // turn on
|
<pre><code>webSocket.enableAutomaticReconnection(); // turn on
|
||||||
|
|||||||
Reference in new issue
Block a user