diff options
| author | gdamore <gdamore@users.noreply.github.com> | 2024-11-07 07:49:00 +0000 |
|---|---|---|
| committer | gdamore <gdamore@users.noreply.github.com> | 2024-11-07 07:49:00 +0000 |
| commit | 561c53325d76b4af604b383acc2f36cec391f39c (patch) | |
| tree | afc5c518b23226b57a47e2875211f1752af5f1fd | |
| parent | 705199eedcb5712e3e2d1ef84c1b8e0dbf01b9d3 (diff) | |
| download | nng-561c53325d76b4af604b383acc2f36cec391f39c.tar.gz nng-561c53325d76b4af604b383acc2f36cec391f39c.tar.bz2 nng-561c53325d76b4af604b383acc2f36cec391f39c.zip | |
deploy: 5f0b0765a9a68ad4f13c7b1a6db56fa537052130
48 files changed, 747 insertions, 1417 deletions
diff --git a/ref/404.html b/ref/404.html index 09c307e2..9e3bb700 100644 --- a/ref/404.html +++ b/ref/404.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -8,7 +8,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -33,7 +33,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -62,19 +62,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -84,45 +81,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/aio.html b/ref/api/aio.html index e506a242..a4886cb8 100644 --- a/ref/api/aio.html +++ b/ref/api/aio.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html" class="active"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/cmd_opts.html b/ref/api/cmd_opts.html index fff75be4..ecee550d 100644 --- a/ref/api/cmd_opts.html +++ b/ref/api/cmd_opts.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html" class="active"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/errors.html b/ref/api/errors.html index 337fac4b..1264be3b 100644 --- a/ref/api/errors.html +++ b/ref/api/errors.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html" class="active"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/id_map.html b/ref/api/id_map.html index 26970d26..72005d0b 100644 --- a/ref/api/id_map.html +++ b/ref/api/id_map.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html" class="active"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/index.html b/ref/api/index.html index 61df6062..e6c0a198 100644 --- a/ref/api/index.html +++ b/ref/api/index.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html" class="active"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/logging.html b/ref/api/logging.html index 4402ff40..78b61567 100644 --- a/ref/api/logging.html +++ b/ref/api/logging.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html" class="active"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/memory.html b/ref/api/memory.html index 3d58726f..986faa58 100644 --- a/ref/api/memory.html +++ b/ref/api/memory.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html" class="active"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/misc.html b/ref/api/misc.html index 3968b7ff..5b0b09d4 100644 --- a/ref/api/misc.html +++ b/ref/api/misc.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html" class="active"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/msg.html b/ref/api/msg.html index 664795c4..3747dc92 100644 --- a/ref/api/msg.html +++ b/ref/api/msg.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html" class="active"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/stats.html b/ref/api/stats.html index 6c483ac6..b488e16c 100644 --- a/ref/api/stats.html +++ b/ref/api/stats.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html" class="active"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/synch.html b/ref/api/synch.html index 1ac1cd57..a87e93ad 100644 --- a/ref/api/synch.html +++ b/ref/api/synch.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html" class="active"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/thread.html b/ref/api/thread.html index e9724325..73405106 100644 --- a/ref/api/thread.html +++ b/ref/api/thread.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html" class="active"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/time.html b/ref/api/time.html index 43a52fb6..ead7ab84 100644 --- a/ref/api/time.html +++ b/ref/api/time.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html" class="active"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/api/url.html b/ref/api/url.html index 3f13797f..2d989b09 100644 --- a/ref/api/url.html +++ b/ref/api/url.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html" class="active"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/book.js b/ref/book.js index aa12e7ec..02b1908d 100644 --- a/ref/book.js +++ b/ref/book.js @@ -225,7 +225,7 @@ function playground_text(playground, hidden = true) { } var clipButton = document.createElement('button'); - clipButton.className = 'fa fa-copy clip-button'; + clipButton.className = 'clip-button'; clipButton.title = 'Copy to clipboard'; clipButton.setAttribute('aria-label', clipButton.title); clipButton.innerHTML = '<i class=\"tooltiptext\"></i>'; @@ -258,7 +258,7 @@ function playground_text(playground, hidden = true) { if (window.playground_copyable) { var copyCodeClipboardButton = document.createElement('button'); - copyCodeClipboardButton.className = 'fa fa-copy clip-button'; + copyCodeClipboardButton.className = 'clip-button'; copyCodeClipboardButton.innerHTML = '<i class="tooltiptext"></i>'; copyCodeClipboardButton.title = 'Copy to clipboard'; copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title); @@ -289,6 +289,10 @@ function playground_text(playground, hidden = true) { var themeToggleButton = document.getElementById('theme-toggle'); var themePopup = document.getElementById('theme-list'); var themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); + var themeIds = []; + themePopup.querySelectorAll('button.theme').forEach(function (el) { + themeIds.push(el.id); + }); var stylesheets = { ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"), tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"), @@ -317,7 +321,7 @@ function playground_text(playground, hidden = true) { function get_theme() { var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { } - if (theme === null || theme === undefined) { + if (theme === null || theme === undefined || !themeIds.includes(theme)) { return default_theme; } else { return theme; @@ -597,12 +601,12 @@ function playground_text(playground, hidden = true) { function hideTooltip(elem) { elem.firstChild.innerText = ""; - elem.className = 'fa fa-copy clip-button'; + elem.className = 'clip-button'; } function showTooltip(elem, msg) { elem.firstChild.innerText = msg; - elem.className = 'fa fa-copy tooltipped'; + elem.className = 'clip-button tooltipped'; } var clipboardSnippets = new ClipboardJS('.clip-button', { diff --git a/ref/copyright.html b/ref/copyright.html index 05e59c36..344faea5 100644 --- a/ref/copyright.html +++ b/ref/copyright.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html" class="active">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/css/chrome.css b/ref/css/chrome.css index 83b7969b..4cd73086 100644 --- a/ref/css/chrome.css +++ b/ref/css/chrome.css @@ -40,9 +40,9 @@ a > .hljs { border-block-end-style: solid; } #menu-bar.sticky, -.js #menu-bar-hover-placeholder:hover + #menu-bar, -.js #menu-bar:hover, -.js.sidebar-visible #menu-bar { +#menu-bar-hover-placeholder:hover + #menu-bar, +#menu-bar:hover, +html.sidebar-visible #menu-bar { position: -webkit-sticky; position: sticky; top: 0 !important; @@ -91,7 +91,7 @@ a > .hljs { display: flex; margin: 0 5px; } -.no-js .left-buttons button { +html:not(.js) .left-buttons button { display: none; } @@ -107,7 +107,7 @@ a > .hljs { overflow: hidden; text-overflow: ellipsis; } -.js .menu-title { +.menu-title { cursor: pointer; } @@ -250,8 +250,8 @@ pre > .buttons i { pre > .buttons button { cursor: inherit; margin: 0px 5px; - padding: 3px 5px; - font-size: 14px; + padding: 4px 4px 3px 5px; + font-size: 23px; border-style: solid; border-width: 1px; @@ -262,6 +262,27 @@ pre > .buttons button { transition-property: color,border-color,background-color; color: var(--icons); } + +pre > .buttons button.clip-button { + padding: 2px 4px 0px 6px; +} +pre > .buttons button.clip-button::before { + /* clipboard image from octicons (https://github.com/primer/octicons/tree/v2.0.0) MIT license + */ + content: url('data:image/svg+xml,<svg width="21" height="20" viewBox="0 0 24 25" \ +xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard">\ +<path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 \ +0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 \ +7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 \ +2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/>\ +<path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/>\ +</svg>'); + filter: var(--copy-button-filter); +} +pre > .buttons button.clip-button:hover::before { + filter: var(--copy-button-filter-hover); +} + @media (pointer: coarse) { pre > .buttons button { /* On mobile, make it easier to tap buttons. */ @@ -399,6 +420,22 @@ ul#searchresults span.teaser em { background-color: var(--sidebar-bg); color: var(--sidebar-fg); } +.sidebar-iframe-inner { + background-color: var(--sidebar-bg); + color: var(--sidebar-fg); + padding: 10px 10px; + margin: 0; + font-size: 1.4rem; +} +.sidebar-iframe-outer { + border: none; + height: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} [dir=rtl] .sidebar { left: unset; right: 0; } .sidebar-resizing { -moz-user-select: none; @@ -406,8 +443,7 @@ ul#searchresults span.teaser em { -ms-user-select: none; user-select: none; } -.no-js .sidebar, -.js:not(.sidebar-resizing) .sidebar { +html:not(.sidebar-resizing) .sidebar { transition: transform 0.3s; /* Animation: slide away */ } .sidebar code { diff --git a/ref/css/general.css b/ref/css/general.css index 7670b087..0862b516 100644 --- a/ref/css/general.css +++ b/ref/css/general.css @@ -190,6 +190,16 @@ kbd { vertical-align: middle; } +sup { + /* Set the line-height for superscript and footnote references so that there + isn't an awkward space appearing above lines that contain the footnote. + + See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583 + for an explanation. + */ + line-height: 0; +} + :not(.footnote-definition) + .footnote-definition, .footnote-definition + :not(.footnote-definition) { margin-block-start: 2em; diff --git a/ref/css/variables.css b/ref/css/variables.css index 0da55e8c..12d1db7a 100644 --- a/ref/css/variables.css +++ b/ref/css/variables.css @@ -56,6 +56,11 @@ --search-mark-bg: #e3b171; --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(45%) sepia(6%) saturate(621%) hue-rotate(198deg) brightness(99%) contrast(85%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(68%) sepia(55%) saturate(531%) hue-rotate(341deg) brightness(104%) contrast(101%); } .coal { @@ -100,9 +105,14 @@ --search-mark-bg: #355c7d; --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); } -.light { +.light, html:not(.js) { --bg: hsl(0, 0%, 100%); --fg: hsl(0, 0%, 0%); @@ -144,6 +154,11 @@ --search-mark-bg: #a2cff5; --color-scheme: light; + + /* Same as `--icons` */ + --copy-button-filter: invert(45.49%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%); } .navy { @@ -188,6 +203,11 @@ --search-mark-bg: #a2cff5; --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(46%) sepia(20%) saturate(1537%) hue-rotate(156deg) brightness(85%) contrast(90%); } .rust { @@ -231,11 +251,14 @@ --searchresults-li-bg: #dec2a2; --search-mark-bg: #e69f67; - --color-scheme: light; + /* Same as `--icons` */ + --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(77%) sepia(16%) saturate(1798%) hue-rotate(328deg) brightness(98%) contrast(83%); } @media (prefers-color-scheme: dark) { - .light.no-js { + html:not(.js) { --bg: hsl(200, 7%, 8%); --fg: #98a3ad; @@ -275,5 +298,12 @@ --searchresults-border-color: #98a3ad; --searchresults-li-bg: #2b2b2f; --search-mark-bg: #355c7d; + + --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); } } diff --git a/ref/dedication.html b/ref/dedication.html index 4491058c..8a883d8a 100644 --- a/ref/dedication.html +++ b/ref/dedication.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html" class="active">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/highlight.css b/ref/highlight.css index ba57b82b..352c79b9 100644 --- a/ref/highlight.css +++ b/ref/highlight.css @@ -16,6 +16,7 @@ .hljs-variable, .hljs-template-variable, .hljs-attribute, +.hljs-attr, .hljs-tag, .hljs-name, .hljs-regexp, diff --git a/ref/index.html b/ref/index.html index 05e59c36..344faea5 100644 --- a/ref/index.html +++ b/ref/index.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html" class="active">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/indexing.html b/ref/indexing.html index 4a42cb41..6e9c6e6d 100644 --- a/ref/indexing.html +++ b/ref/indexing.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html" class="active">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/migrate/index.html b/ref/migrate/index.html index f069d9da..33c87467 100644 --- a/ref/migrate/index.html +++ b/ref/migrate/index.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html" class="active"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/migrate/nanomsg.html b/ref/migrate/nanomsg.html index 5d8dd921..8b040ca5 100644 --- a/ref/migrate/nanomsg.html +++ b/ref/migrate/nanomsg.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html" class="active"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/migrate/nng1.html b/ref/migrate/nng1.html index 3d2e24d3..6f851afe 100644 --- a/ref/migrate/nng1.html +++ b/ref/migrate/nng1.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html" class="active"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/preface.html b/ref/preface.html index 7d809666..925f4784 100644 --- a/ref/preface.html +++ b/ref/preface.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html" class="active">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/print.html b/ref/print.html index b77b8054..c952dccd 100644 --- a/ref/print.html +++ b/ref/print.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -8,7 +8,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -33,7 +33,7 @@ <link rel="stylesheet" href="theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -62,19 +62,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -84,45 +81,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/bus.html b/ref/proto/bus.html index b69dd437..8dfe6dff 100644 --- a/ref/proto/bus.html +++ b/ref/proto/bus.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html" class="active"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/index.html b/ref/proto/index.html index b3eae7b8..080bf5be 100644 --- a/ref/proto/index.html +++ b/ref/proto/index.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html" class="active"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/pair.html b/ref/proto/pair.html index 8c3a6883..3d0cbead 100644 --- a/ref/proto/pair.html +++ b/ref/proto/pair.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html" class="active"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/pub.html b/ref/proto/pub.html index 59300a28..7f63ef10 100644 --- a/ref/proto/pub.html +++ b/ref/proto/pub.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html" class="active"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/pull.html b/ref/proto/pull.html index 64b65dcf..238fb7c2 100644 --- a/ref/proto/pull.html +++ b/ref/proto/pull.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html" class="active"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/push.html b/ref/proto/push.html index befce0b7..559f38d1 100644 --- a/ref/proto/push.html +++ b/ref/proto/push.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html" class="active"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/rep.html b/ref/proto/rep.html index e66fa5a4..7b858306 100644 --- a/ref/proto/rep.html +++ b/ref/proto/rep.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html" class="active"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/req.html b/ref/proto/req.html index 072c737e..ee9e0cf0 100644 --- a/ref/proto/req.html +++ b/ref/proto/req.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html" class="active"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/respondent.html b/ref/proto/respondent.html index 5a87d386..659f6eae 100644 --- a/ref/proto/respondent.html +++ b/ref/proto/respondent.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html" class="active"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/sub.html b/ref/proto/sub.html index 49041f0b..83f6f103 100644 --- a/ref/proto/sub.html +++ b/ref/proto/sub.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html" class="active"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/proto/surveyor.html b/ref/proto/surveyor.html index 8a06acaf..9dc71483 100644 --- a/ref/proto/surveyor.html +++ b/ref/proto/surveyor.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html" class="active"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/toc.html b/ref/toc.html new file mode 100644 index 00000000..42ffeed2 --- /dev/null +++ b/ref/toc.html @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html lang="en" class="light" dir="ltr"> + <head> + <!-- sidebar iframe generated using mdBook + + This is a frame, and not included directly in the page, to control the total size of the + book. The TOC contains an entry for each page, so if each page includes a copy of the TOC, + the total size of the page becomes O(n**2). + + The frame is only used as a fallback when JS is turned off. When it's on, the sidebar is + instead added to the main page by `toc.js` instead. The JavaScript mode is better + because, when running in a `file:///` URL, the iframed page would not be Same-Origin as + the rest of the page, so the sidebar and the main page theme would fall out of sync. + --> + <meta charset="UTF-8"> + <meta name="robots" content="noindex"> + <!-- Custom HTML head --> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="theme-color" content="#ffffff"> + <link rel="stylesheet" href="css/variables.css"> + <link rel="stylesheet" href="css/general.css"> + <link rel="stylesheet" href="css/chrome.css"> + <link rel="stylesheet" href="css/print.css" media="print"> + <!-- Fonts --> + <link rel="stylesheet" href="FontAwesome/css/font-awesome.css"> + <link rel="stylesheet" href="fonts/fonts.css"> + <!-- Custom theme stylesheets --> + <link rel="stylesheet" href="theme/pagetoc.css"> + </head> + <body class="sidebar-iframe-inner"> + <ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html" target="_parent">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html" target="_parent">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html" target="_parent">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html" target="_parent"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html" target="_parent"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html" target="_parent"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html" target="_parent"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html" target="_parent"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html" target="_parent"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html" target="_parent"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html" target="_parent"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html" target="_parent"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html" target="_parent"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html" target="_parent"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html" target="_parent"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html" target="_parent"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html" target="_parent"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html" target="_parent"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html" target="_parent"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html" target="_parent"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html" target="_parent"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html" target="_parent"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html" target="_parent"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html" target="_parent"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html" target="_parent"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html" target="_parent"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html" target="_parent"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html" target="_parent"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html" target="_parent"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html" target="_parent"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html" target="_parent"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html" target="_parent"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html" target="_parent"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html" target="_parent"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html" target="_parent"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html" target="_parent"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html" target="_parent">Index</a></li></ol> + </body> +</html> diff --git a/ref/toc.js b/ref/toc.js new file mode 100644 index 00000000..cee7f3a4 --- /dev/null +++ b/ref/toc.js @@ -0,0 +1,54 @@ +// Populate the sidebar +// +// This is a script, and not included directly in the page, to control the total size of the book. +// The TOC contains an entry for each page, so if each page includes a copy of the TOC, +// the total size of the page becomes O(n**2). +var sidebarScrollbox = document.querySelector("#sidebar .sidebar-scrollbox"); +sidebarScrollbox.innerHTML = '<ol class="chapter"><li class="chapter-item expanded affix "><a href="copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded "><a href="api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="indexing.html">Index</a></li></ol>'; +(function() { + let current_page = document.location.href.toString(); + if (current_page.endsWith("/")) { + current_page += "index.html"; + } + var links = sidebarScrollbox.querySelectorAll("a"); + var l = links.length; + for (var i = 0; i < l; ++i) { + var link = links[i]; + var href = link.getAttribute("href"); + if (href && !href.startsWith("#") && !/^(?:[a-z+]+:)?\/\//.test(href)) { + link.href = path_to_root + href; + } + // The "index" page is supposed to alias the first chapter in the book. + if (link.href === current_page || (i === 0 && path_to_root === "" && current_page.endsWith("/index.html"))) { + link.classList.add("active"); + var parent = link.parentElement; + while (parent) { + if (parent.tagName === "LI" && parent.previousElementSibling) { + if (parent.previousElementSibling.classList.contains("chapter-item")) { + parent.previousElementSibling.classList.add("expanded"); + } + } + parent = parent.parentElement; + } + } + } +})(); + +// Track and set sidebar scroll position +sidebarScrollbox.addEventListener('click', function(e) { + if (e.target.tagName === 'A') { + sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); + } +}, { passive: true }); +var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); +sessionStorage.removeItem('sidebar-scroll'); +if (sidebarScrollTop) { + // preserve sidebar scroll position when navigating via links within sidebar + sidebarScrollbox.scrollTop = sidebarScrollTop; +} else { + // scroll sidebar to current active section when navigating via "next/previous chapter" buttons + var activeSection = document.querySelector('#sidebar .active'); + if (activeSection) { + activeSection.scrollIntoView({ block: 'center' }); + } +} diff --git a/ref/tomorrow-night.css b/ref/tomorrow-night.css index 81fe276e..11752b8a 100644 --- a/ref/tomorrow-night.css +++ b/ref/tomorrow-night.css @@ -11,6 +11,7 @@ /* Tomorrow Red */ .hljs-variable, .hljs-attribute, +.hljs-attr, .hljs-tag, .hljs-regexp, .ruby .hljs-constant, @@ -54,6 +55,7 @@ /* Tomorrow Aqua */ .hljs-title, +.hljs-section, .css .hljs-hexcolor { color: #8abeb7; } diff --git a/ref/tran/index.html b/ref/tran/index.html index 1aa19f3a..28d6af4b 100644 --- a/ref/tran/index.html +++ b/ref/tran/index.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html" class="active"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/tran/inproc.html b/ref/tran/inproc.html index 0d2703b8..55bb76e4 100644 --- a/ref/tran/inproc.html +++ b/ref/tran/inproc.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html" class="active"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/tran/ipc.html b/ref/tran/ipc.html index 61e01ca2..4e4b992d 100644 --- a/ref/tran/ipc.html +++ b/ref/tran/ipc.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html" class="active"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/tran/socket.html b/ref/tran/socket.html index 9ecb2dd9..d8ab0e47 100644 --- a/ref/tran/socket.html +++ b/ref/tran/socket.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html" class="active"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> diff --git a/ref/tran/udp.html b/ref/tran/udp.html index 51d44b7a..aaff3848 100644 --- a/ref/tran/udp.html +++ b/ref/tran/udp.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en" class="light" dir="ltr"> +<html lang="en" class="light sidebar-visible" dir="ltr"> <head> <!-- Book generated using mdBook --> <meta charset="UTF-8"> @@ -7,7 +7,7 @@ <!-- Custom HTML head --> - + <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> @@ -32,7 +32,7 @@ <link rel="stylesheet" href="../theme/pagetoc.css"> </head> - <body class="sidebar-visible no-js"> + <body> <div id="body-container"> <!-- Provide site root to javascript --> <script> @@ -61,19 +61,16 @@ var theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); + const html = document.documentElement; html.classList.remove('light') html.classList.add(theme); - var body = document.querySelector('body'); - body.classList.remove('no-js') - body.classList.add('js'); + html.classList.add("js"); </script> <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> <!-- Hide / unhide sidebar before it is displayed --> <script> - var body = document.querySelector('body'); var sidebar = null; var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { @@ -83,45 +80,27 @@ sidebar = 'hidden'; } sidebar_toggle.checked = sidebar === 'visible'; - body.classList.remove('sidebar-visible'); - body.classList.add("sidebar-" + sidebar); + html.classList.remove('sidebar-visible'); + html.classList.add("sidebar-" + sidebar); </script> <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - <ol class="chapter"><li class="chapter-item expanded affix "><a href="../copyright.html">Copyright</a></li><li class="chapter-item expanded affix "><a href="../dedication.html">Dedication</a></li><li class="chapter-item expanded affix "><a href="../preface.html">Preface</a></li><li class="chapter-item expanded "><a href="../api/index.html"><strong aria-hidden="true">1.</strong> API Reference</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../api/msg.html"><strong aria-hidden="true">1.1.</strong> Messages</a></li><li class="chapter-item expanded "><a href="../api/memory.html"><strong aria-hidden="true">1.2.</strong> Memory</a></li><li class="chapter-item expanded "><a href="../api/time.html"><strong aria-hidden="true">1.3.</strong> Time</a></li><li class="chapter-item expanded "><a href="../api/url.html"><strong aria-hidden="true">1.4.</strong> URLs</a></li><li class="chapter-item expanded "><a href="../api/aio.html"><strong aria-hidden="true">1.5.</strong> Asynchronous I/O</a></li><li class="chapter-item expanded "><a href="../api/synch.html"><strong aria-hidden="true">1.6.</strong> Synchronization</a></li><li class="chapter-item expanded "><a href="../api/thread.html"><strong aria-hidden="true">1.7.</strong> Threads</a></li><li class="chapter-item expanded "><a href="../api/logging.html"><strong aria-hidden="true">1.8.</strong> Logging</a></li><li class="chapter-item expanded "><a href="../api/stats.html"><strong aria-hidden="true">1.9.</strong> Statistics</a></li><li class="chapter-item expanded "><a href="../api/errors.html"><strong aria-hidden="true">1.10.</strong> Errors</a></li><li class="chapter-item expanded "><a href="../api/misc.html"><strong aria-hidden="true">1.11.</strong> Miscellaneous</a></li><li class="chapter-item expanded "><a href="../api/id_map.html"><strong aria-hidden="true">1.12.</strong> ID Map</a></li><li class="chapter-item expanded "><a href="../api/cmd_opts.html"><strong aria-hidden="true">1.13.</strong> Command Options</a></li></ol></li><li class="chapter-item expanded "><a href="../proto/index.html"><strong aria-hidden="true">2.</strong> Protocols</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../proto/bus.html"><strong aria-hidden="true">2.1.</strong> BUS Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pair.html"><strong aria-hidden="true">2.2.</strong> PAIR Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pub.html"><strong aria-hidden="true">2.3.</strong> PUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/pull.html"><strong aria-hidden="true">2.4.</strong> PULL Protocol</a></li><li class="chapter-item expanded "><a href="../proto/push.html"><strong aria-hidden="true">2.5.</strong> PUSH Protocol</a></li><li class="chapter-item expanded "><a href="../proto/rep.html"><strong aria-hidden="true">2.6.</strong> REP Protocol</a></li><li class="chapter-item expanded "><a href="../proto/req.html"><strong aria-hidden="true">2.7.</strong> REQ Protocol</a></li><li class="chapter-item expanded "><a href="../proto/respondent.html"><strong aria-hidden="true">2.8.</strong> RESPONDENT Protocol</a></li><li class="chapter-item expanded "><a href="../proto/sub.html"><strong aria-hidden="true">2.9.</strong> SUB Protocol</a></li><li class="chapter-item expanded "><a href="../proto/surveyor.html"><strong aria-hidden="true">2.10.</strong> SURVEYOR Protocol</a></li></ol></li><li class="chapter-item expanded "><a href="../tran/index.html"><strong aria-hidden="true">3.</strong> Transports</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../tran/inproc.html"><strong aria-hidden="true">3.1.</strong> Intra-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/ipc.html"><strong aria-hidden="true">3.2.</strong> Inter-Process Transport</a></li><li class="chapter-item expanded "><a href="../tran/socket.html"><strong aria-hidden="true">3.3.</strong> BSD Socket (Experimental)</a></li><li class="chapter-item expanded "><a href="../tran/udp.html" class="active"><strong aria-hidden="true">3.4.</strong> UDP Transport (Experimental)</a></li></ol></li><li class="chapter-item expanded "><a href="../migrate/index.html"><strong aria-hidden="true">4.</strong> Migration Guides</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../migrate/nng1.html"><strong aria-hidden="true">4.1.</strong> Migrating from NNG 1.x</a></li><li class="chapter-item expanded "><a href="../migrate/nanomsg.html"><strong aria-hidden="true">4.2.</strong> Migrating from libnanomsg</a></li></ol></li><li class="chapter-item expanded "><a href="../indexing.html">Index</a></li></ol> - </div> + <!-- populated by js --> + <div class="sidebar-scrollbox"></div> + <noscript> + <iframe class="sidebar-iframe-outer" src="../toc.html"></iframe> + </noscript> <div id="sidebar-resize-handle" class="sidebar-resize-handle"> <div class="sidebar-resize-indicator"></div> </div> </nav> - <!-- Track and set sidebar scroll position --> - <script> - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); - sidebarScrollbox.addEventListener('click', function(e) { - if (e.target.tagName === 'A') { - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); - } - }, { passive: true }); - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); - sessionStorage.removeItem('sidebar-scroll'); - if (sidebarScrollTop) { - // preserve sidebar scroll position when navigating via links within sidebar - sidebarScrollbox.scrollTop = sidebarScrollTop; - } else { - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons - var activeSection = document.querySelector('#sidebar .active'); - if (activeSection) { - activeSection.scrollIntoView({ block: 'center' }); - } - } - </script> + <script async src="../toc.js"></script> <div id="page-wrapper" class="page-wrapper"> <div class="page"> - <div id="menu-bar-hover-placeholder"></div> + <div id="menu-bar-hover-placeholder"></div> <div id="menu-bar" class="menu-bar sticky"> <div class="left-buttons"> <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> |
