Update docs

This commit is contained in:
Alex Hultman 2021-04-10 23:44:05 +02:00
parent f246c246d0
commit acbddcd888
14 changed files with 914 additions and 163 deletions

View file

@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>WebSocket | uWebSockets.js v18.1.0 documentation</title>
<meta name="description" content="Documentation for uWebSockets.js v18.1.0 documentation">
<title>WebSocket | uWebSockets.js v19.0.0 documentation</title>
<meta name="description" content="Documentation for uWebSockets.js v19.0.0 documentation">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">uWebSockets.js v18.1.0 documentation</a>
<a href="../index.html" class="title">uWebSockets.js v19.0.0 documentation</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
@ -102,12 +102,13 @@
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#getbufferedamount" class="tsd-kind-icon">get<wbr>Buffered<wbr>Amount</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#getremoteaddress" class="tsd-kind-icon">get<wbr>Remote<wbr>Address</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#getremoteaddressastext" class="tsd-kind-icon">get<wbr>Remote<wbr>Address<wbr>AsText</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#gettopics" class="tsd-kind-icon">get<wbr>Topics</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#issubscribed" class="tsd-kind-icon">is<wbr>Subscribed</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#ping" class="tsd-kind-icon">ping</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#publish" class="tsd-kind-icon">publish</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#send" class="tsd-kind-icon">send</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#subscribe" class="tsd-kind-icon">subscribe</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#unsubscribe" class="tsd-kind-icon">unsubscribe</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="websocket.html#unsubscribeall" class="tsd-kind-icon">unsubscribe<wbr>All</a></li>
</ul>
</section>
</div>
@ -125,7 +126,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L50">index.d.ts:50</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L64">index.d.ts:64</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -148,7 +149,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L83">index.d.ts:83</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L100">index.d.ts:100</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -188,7 +189,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L45">index.d.ts:45</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L59">index.d.ts:59</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -220,7 +221,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L40">index.d.ts:40</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L54">index.d.ts:54</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -243,7 +244,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L92">index.d.ts:92</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L109">index.d.ts:109</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -268,7 +269,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L95">index.d.ts:95</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L112">index.d.ts:112</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -280,6 +281,56 @@
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="gettopics" class="tsd-anchor"></a>
<h3>get<wbr>Topics</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">get<wbr>Topics<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L85">index.d.ts:85</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a list of topics this websocket is subscribed to.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="issubscribed" class="tsd-anchor"></a>
<h3>is<wbr>Subscribed</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">is<wbr>Subscribed<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L82">index.d.ts:82</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns whether this websocket is subscribed to topic.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>topic: <a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="ping" class="tsd-anchor"></a>
<h3>ping</h3>
@ -290,7 +341,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L53">index.d.ts:53</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L67">index.d.ts:67</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -312,13 +363,13 @@
<a name="publish" class="tsd-anchor"></a>
<h3>publish</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">publish<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a>, message<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a>, isBinary<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, compress<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a></li>
<li class="tsd-signature tsd-kind-icon">publish<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a>, message<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a>, isBinary<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, compress<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L80">index.d.ts:80</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L97">index.d.ts:97</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -346,7 +397,7 @@
<h5><span class="tsd-flag ts-flagOptional">Optional</span> compress: <span class="tsd-signature-type">boolean</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="websocket.html" class="tsd-signature-type">WebSocket</a></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
@ -360,7 +411,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L35">index.d.ts:35</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L49">index.d.ts:49</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -390,13 +441,13 @@
<a name="subscribe" class="tsd-anchor"></a>
<h3>subscribe</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a></li>
<li class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L62">index.d.ts:62</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L76">index.d.ts:76</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -413,7 +464,7 @@
<h5>topic: <a href="../index.html#recognizedstring" class="tsd-signature-type">RecognizedString</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="websocket.html" class="tsd-signature-type">WebSocket</a></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
@ -427,7 +478,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L65">index.d.ts:65</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L79">index.d.ts:79</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -445,28 +496,6 @@
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="unsubscribeall" class="tsd-anchor"></a>
<h3>unsubscribe<wbr>All</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">unsubscribe<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L68">index.d.ts:68</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Unsubscribe from all topics. This is called automatically before any close handler is called, so you never need to call this manually in the close handler of a WebSocket.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
@ -479,6 +508,9 @@
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-enum">
<a href="../enums/listenoptions.html" class="tsd-kind-icon">Listen<wbr>Options</a>
</li>
<li class=" tsd-kind-interface">
<a href="appoptions.html" class="tsd-kind-icon">App<wbr>Options</a>
</li>
@ -488,6 +520,9 @@
<li class=" tsd-kind-interface">
<a href="httpresponse.html" class="tsd-kind-icon">Http<wbr>Response</a>
</li>
<li class=" tsd-kind-interface">
<a href="multipartfield.html" class="tsd-kind-icon">Multipart<wbr>Field</a>
</li>
<li class=" tsd-kind-interface">
<a href="templatedapp.html" class="tsd-kind-icon">Templated<wbr>App</a>
</li>
@ -514,6 +549,12 @@
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#getremoteaddressastext" class="tsd-kind-icon">get<wbr>Remote<wbr>Address<wbr>AsText</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#gettopics" class="tsd-kind-icon">get<wbr>Topics</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#issubscribed" class="tsd-kind-icon">is<wbr>Subscribed</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#ping" class="tsd-kind-icon">ping</a>
</li>
@ -529,9 +570,6 @@
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#unsubscribe" class="tsd-kind-icon">unsubscribe</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="websocket.html#unsubscribeall" class="tsd-kind-icon">unsubscribe<wbr>All</a>
</li>
</ul>
</li>
</ul>
@ -587,6 +625,9 @@
<li class=" tsd-kind-function">
<a href="../index.html#sslapp" class="tsd-kind-icon">SSLApp</a>
</li>
<li class=" tsd-kind-function">
<a href="../index.html#getparts" class="tsd-kind-icon">get<wbr>Parts</a>
</li>
<li class=" tsd-kind-function">
<a href="../index.html#us_listen_socket_close" class="tsd-kind-icon">us_<wbr>listen_<wbr>socket_<wbr>close</a>
</li>