mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-11-07 18:11:38 +01:00
Deploying to gh-pages from @ espressif/esp-protocols@804a8d5df6 🚀
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 30c971282ae9eb0824b7cd89246095e9
|
||||
config: 7181901e1609fe25920bd55c8491d044
|
||||
tags: 549b3d6d0415232fb7e35403b330ff49
|
||||
|
||||
@@ -154,9 +154,7 @@ var Documentation = {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||
this.initOnKeyListeners();
|
||||
}
|
||||
this.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -269,6 +267,13 @@ var Documentation = {
|
||||
window.history.replaceState({}, '', url);
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
focusSearchBar : function() {
|
||||
$('input[name=q]').first().focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* make the url absolute
|
||||
*/
|
||||
@@ -291,27 +296,54 @@ var Documentation = {
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
return;
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
||||
&& !event.shiftKey) {
|
||||
switch (event.keyCode) {
|
||||
case 37: // left
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 39: // right
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
&& activeElementType !== 'BUTTON') {
|
||||
if (event.altKey || event.ctrlKey || event.metaKey)
|
||||
return;
|
||||
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case 'ArrowLeft':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'ArrowRight':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'Escape':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
Documentation.hideSearchWords();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case '/':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
Documentation.focusSearchBar();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -8,5 +8,7 @@ var DOCUMENTATION_OPTIONS = {
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
NAVIGATION_WITH_KEYS: false,
|
||||
SHOW_SEARCH_SUMMARY: true,
|
||||
ENABLE_SEARCH_SHORTCUTS: true,
|
||||
};
|
||||
@@ -172,10 +172,6 @@ var Search = {
|
||||
}
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||
// prevent stemmer from cutting word smaller than two chars
|
||||
if(word.length < 3 && tmp[i].length >= 3) {
|
||||
word = tmp[i];
|
||||
}
|
||||
var toAppend;
|
||||
// select the correct list
|
||||
if (word[0] == '-') {
|
||||
@@ -276,7 +272,7 @@ var Search = {
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
@@ -293,7 +289,7 @@ var Search = {
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
// just display title
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/espressif/esp-docs/blob/16ea3f7/docs/en/genindex" class="fa fa-github"> Edit on GitHub</a>
|
||||
<a href="https://github.com/espressif/esp-docs/blob/804a8d5/docs/en/genindex" class="fa fa-github"> Edit on GitHub</a>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/espressif/esp-docs/blob/16ea3f7/docs/en/index.rst" class="fa fa-github"> Edit on GitHub</a>
|
||||
<a href="https://github.com/espressif/esp-docs/blob/804a8d5/docs/en/index.rst" class="fa fa-github"> Edit on GitHub</a>
|
||||
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ overridden. Sample:</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>If you want to verify the server, then you need to provide a certificate in PEM format, and provide to <code class="docutils literal notranslate"><span class="pre">cert_pem</span></code> in <code class="xref cpp cpp-type docutils literal notranslate"><span class="pre">websocket_client_config_t</span></code>. If no certficate is provided then the TLS connection will default to not requiring verification.</p>
|
||||
</aside>
|
||||
</div>
|
||||
<p>PEM certificate for this example could be extracted from an openssl <cite>s_client</cite> command connecting to websocket.org.
|
||||
In case a host operating system has <cite>openssl</cite> and <cite>sed</cite> packages installed, one could execute the following command to download and save the root or intermediate root certificate to a file (Note for Windows users: Both Linux like environment or Windows native packages may be used).
|
||||
<code class="docutils literal notranslate"><span class="pre">`</span>
|
||||
@@ -289,7 +289,7 @@ In case a host operating system has <cite>openssl</cite> and <cite>sed</cite> pa
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>The client is indifferent to the subprotocol field in the server response and will accept the connection no matter what the server replies.</p>
|
||||
</aside>
|
||||
</div>
|
||||
<p>For more options on <a class="reference internal" href="#_CPPv429esp_websocket_client_config_t" title="esp_websocket_client_config_t"><code class="xref cpp cpp-type docutils literal notranslate"><span class="pre">esp_websocket_client_config_t</span></code></a>, please refer to API reference below</p>
|
||||
</section>
|
||||
</section>
|
||||
@@ -314,7 +314,7 @@ In case a host operating system has <cite>openssl</cite> and <cite>sed</cite> pa
|
||||
</section>
|
||||
<section id="application-example">
|
||||
<h2>Application Example<a class="headerlink" href="#application-example" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A simple WebSocket example that uses esp_websocket_client to establish a websocket connection and send/receive data with the <a class="reference external" href="https://websocket.org">websocket.org</a> server can be found here: <a class="reference external" href="https://github.com/espressif/esp-protocols/tree/16ea3f7/examples/../examples">example </a>.</p>
|
||||
<p>A simple WebSocket example that uses esp_websocket_client to establish a websocket connection and send/receive data with the <a class="reference external" href="https://websocket.org">websocket.org</a> server can be found here: <a class="reference external" href="https://github.com/espressif/esp-protocols/tree/804a8d5/examples/../examples">example </a>.</p>
|
||||
<section id="sending-text-data">
|
||||
<h3>Sending Text Data<a class="headerlink" href="#sending-text-data" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The WebSocket client supports sending data as a text data frame, which informs the application layer that the payload data is text data encoded as UTF-8. Example:</p>
|
||||
@@ -328,7 +328,7 @@ In case a host operating system has <cite>openssl</cite> and <cite>sed</cite> pa
|
||||
<section id="header-file">
|
||||
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/espressif/esp-protocols/blob/16ea3f7/include/esp_websocket_client.h">include/esp_websocket_client.h</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/espressif/esp-protocols/blob/804a8d5/include/esp_websocket_client.h">include/esp_websocket_client.h</a></p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="functions">
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/espressif/esp-docs/blob/16ea3f7/docs/en/search" class="fa fa-github"> Edit on GitHub</a>
|
||||
<a href="https://github.com/espressif/esp-docs/blob/804a8d5/docs/en/search" class="fa fa-github"> Edit on GitHub</a>
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user