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>WebSocketBehavior | uWebSockets.js v18.1.0 documentation</title>
<meta name="description" content="Documentation for uWebSockets.js v18.1.0 documentation">
<title>WebSocketBehavior | 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">
@ -110,7 +110,7 @@
<div class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, code<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L225">index.d.ts:225</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L244">index.d.ts:244</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -152,12 +152,12 @@
<div class="tsd-signature tsd-kind-icon">compression<span class="tsd-signature-symbol">:</span> <a href="../index.html#compressoptions" class="tsd-signature-type">CompressOptions</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L211">index.d.ts:211</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L230">index.d.ts:230</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>What permessage-deflate compression to use. uWS.DISABLED, uWS.SHARED_COMPRESSOR or any of the uWS.DEDICATED_COMPRESSOR_xxxKB.</p>
<p>What permessage-deflate compression to use. uWS.DISABLED, uWS.SHARED_COMPRESSOR or any of the uWS.DEDICATED_COMPRESSOR_xxxKB. Defaults to uWS.DISABLED.</p>
</div>
</div>
</section>
@ -167,7 +167,7 @@
<div class="tsd-signature tsd-kind-icon">drain<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L223">index.d.ts:223</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L242">index.d.ts:242</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -203,13 +203,13 @@
<div class="tsd-signature tsd-kind-icon">idle<wbr>Timeout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L209">index.d.ts:209</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L228">index.d.ts:228</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Maximum amount of seconds that may pass without sending or getting a message. Connection is closed if this timeout passes. Resolution (granularity) for timeouts are typically 4 seconds, rounded to closest.
Disable by leaving 0.</p>
Disable by using 0. Defaults to 120.</p>
</div>
</div>
</section>
@ -219,12 +219,12 @@
<div class="tsd-signature tsd-kind-icon">max<wbr>Backpressure<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L213">index.d.ts:213</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L232">index.d.ts:232</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Maximum length of allowed backpressure per socket when PUBLISHING messages (does not apply to ws.send). Slow receivers with too high backpressure will be skipped until they catch up or timeout.</p>
<p>Maximum length of allowed backpressure per socket when publishing or sending messages. Slow receivers with too high backpressure will be skipped until they catch up or timeout. Defaults to 1024 * 1024.</p>
</div>
</div>
</section>
@ -234,12 +234,12 @@
<div class="tsd-signature tsd-kind-icon">max<wbr>Payload<wbr>Length<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L205">index.d.ts:205</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L224">index.d.ts:224</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Maximum length of received message. If a client tries to send you a message larger than this, the connection is immediately closed.</p>
<p>Maximum length of received message. If a client tries to send you a message larger than this, the connection is immediately closed. Defaults to 16 * 1024.</p>
</div>
</div>
</section>
@ -249,7 +249,7 @@
<div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, isBinary<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L221">index.d.ts:221</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L240">index.d.ts:240</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -291,7 +291,7 @@
<div class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L219">index.d.ts:219</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L238">index.d.ts:238</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -324,10 +324,10 @@
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="ping" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> ping</h3>
<div class="tsd-signature tsd-kind-icon">ping<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<div class="tsd-signature tsd-kind-icon">ping<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L227">index.d.ts:227</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L246">index.d.ts:246</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -340,7 +340,7 @@
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</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">
@ -349,6 +349,9 @@
<li>
<h5>ws: <a href="websocket.html" class="tsd-signature-type">WebSocket</a></h5>
</li>
<li>
<h5>message: <span class="tsd-signature-type">ArrayBuffer</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
@ -360,10 +363,10 @@
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="pong" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> pong</h3>
<div class="tsd-signature tsd-kind-icon">pong<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<div class="tsd-signature tsd-kind-icon">pong<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L229">index.d.ts:229</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L248">index.d.ts:248</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -376,7 +379,7 @@
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>ws<span class="tsd-signature-symbol">: </span><a href="websocket.html" class="tsd-signature-type">WebSocket</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</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">
@ -385,6 +388,9 @@
<li>
<h5>ws: <a href="websocket.html" class="tsd-signature-type">WebSocket</a></h5>
</li>
<li>
<h5>message: <span class="tsd-signature-type">ArrayBuffer</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
@ -399,7 +405,7 @@
<div class="tsd-signature tsd-kind-icon">upgrade<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><a href="httpresponse.html" class="tsd-signature-type">HttpResponse</a>, req<span class="tsd-signature-symbol">: </span><a href="httprequest.html" class="tsd-signature-type">HttpRequest</a>, context<span class="tsd-signature-symbol">: </span><a href="us_socket_context_t.html" class="tsd-signature-type">us_socket_context_t</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f35f8c7/docs/index.d.ts#L217">index.d.ts:217</a></li>
<li>Defined in <a href="https://github.com/uNetworking/uWebSockets.js/blob/f246c24/docs/index.d.ts#L236">index.d.ts:236</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -448,6 +454,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>
@ -457,6 +466,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>
@ -553,6 +565,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>