diff --git a/docs/Makefile b/docs/Makefile index 49a465ea..1f5ffa30 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,2 +1,2 @@ default: - typedoc --out generated --includeDeclarations --excludeExternals --name "uWebSockets.js v16.5.0 documentation" --mode file --readme none . + typedoc --out generated --includeDeclarations --excludeExternals --name "uWebSockets.js v17.0.0 documentation" --mode file --readme none . diff --git a/docs/generated/assets/js/search.js b/docs/generated/assets/js/search.js index 69b25de7..2a857342 100644 --- a/docs/generated/assets/js/search.js +++ b/docs/generated/assets/js/search.js @@ -1,3 +1,3 @@ var typedoc = typedoc || {}; typedoc.search = typedoc.search || {}; - typedoc.search.data = {"kinds":{"32":"Variable","64":"Function","256":"Interface","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":256,"name":"us_listen_socket","url":"interfaces/us_listen_socket.html","classes":"tsd-kind-interface"},{"id":1,"kind":256,"name":"WebSocket","url":"interfaces/websocket.html","classes":"tsd-kind-interface"},{"id":2,"kind":2048,"name":"send","url":"interfaces/websocket.html#send","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":3,"kind":2048,"name":"getBufferedAmount","url":"interfaces/websocket.html#getbufferedamount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":4,"kind":2048,"name":"end","url":"interfaces/websocket.html#end","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":5,"kind":2048,"name":"close","url":"interfaces/websocket.html#close","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":6,"kind":2048,"name":"subscribe","url":"interfaces/websocket.html#subscribe","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":7,"kind":2048,"name":"unsubscribe","url":"interfaces/websocket.html#unsubscribe","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":8,"kind":2048,"name":"publish","url":"interfaces/websocket.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":9,"kind":2048,"name":"getRemoteAddress","url":"interfaces/websocket.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":10,"kind":256,"name":"HttpResponse","url":"interfaces/httpresponse.html","classes":"tsd-kind-interface"},{"id":11,"kind":2048,"name":"writeStatus","url":"interfaces/httpresponse.html#writestatus","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":12,"kind":2048,"name":"writeHeader","url":"interfaces/httpresponse.html#writeheader","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":13,"kind":2048,"name":"write","url":"interfaces/httpresponse.html#write","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":14,"kind":2048,"name":"end","url":"interfaces/httpresponse.html#end","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":15,"kind":2048,"name":"tryEnd","url":"interfaces/httpresponse.html#tryend","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":16,"kind":2048,"name":"close","url":"interfaces/httpresponse.html#close","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":17,"kind":2048,"name":"getWriteOffset","url":"interfaces/httpresponse.html#getwriteoffset","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":18,"kind":2048,"name":"onWritable","url":"interfaces/httpresponse.html#onwritable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":19,"kind":2048,"name":"onAborted","url":"interfaces/httpresponse.html#onaborted","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":20,"kind":2048,"name":"onData","url":"interfaces/httpresponse.html#ondata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":21,"kind":2048,"name":"getRemoteAddress","url":"interfaces/httpresponse.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":22,"kind":2048,"name":"cork","url":"interfaces/httpresponse.html#cork","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":23,"kind":256,"name":"HttpRequest","url":"interfaces/httprequest.html","classes":"tsd-kind-interface"},{"id":24,"kind":2048,"name":"getHeader","url":"interfaces/httprequest.html#getheader","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":25,"kind":2048,"name":"getParameter","url":"interfaces/httprequest.html#getparameter","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":26,"kind":2048,"name":"getUrl","url":"interfaces/httprequest.html#geturl","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":27,"kind":2048,"name":"getMethod","url":"interfaces/httprequest.html#getmethod","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":28,"kind":2048,"name":"getQuery","url":"interfaces/httprequest.html#getquery","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":29,"kind":2048,"name":"forEach","url":"interfaces/httprequest.html#foreach","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":30,"kind":2048,"name":"setYield","url":"interfaces/httprequest.html#setyield","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":31,"kind":256,"name":"WebSocketBehavior","url":"interfaces/websocketbehavior.html","classes":"tsd-kind-interface"},{"id":32,"kind":1024,"name":"maxPayloadLength","url":"interfaces/websocketbehavior.html#maxpayloadlength","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":33,"kind":1024,"name":"idleTimeout","url":"interfaces/websocketbehavior.html#idletimeout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":34,"kind":1024,"name":"compression","url":"interfaces/websocketbehavior.html#compression","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":35,"kind":1024,"name":"maxBackpressure","url":"interfaces/websocketbehavior.html#maxbackpressure","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":36,"kind":1024,"name":"open","url":"interfaces/websocketbehavior.html#open","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":37,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#open.__type-3","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.open"},{"id":38,"kind":1024,"name":"message","url":"interfaces/websocketbehavior.html#message","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":39,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#message.__type-2","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.message"},{"id":40,"kind":1024,"name":"drain","url":"interfaces/websocketbehavior.html#drain","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":41,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#drain.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.drain"},{"id":42,"kind":1024,"name":"close","url":"interfaces/websocketbehavior.html#close","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":43,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#close.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.close"},{"id":44,"kind":256,"name":"AppOptions","url":"interfaces/appoptions.html","classes":"tsd-kind-interface"},{"id":45,"kind":1024,"name":"key_file_name","url":"interfaces/appoptions.html#key_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":46,"kind":1024,"name":"cert_file_name","url":"interfaces/appoptions.html#cert_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":47,"kind":1024,"name":"passphrase","url":"interfaces/appoptions.html#passphrase","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":48,"kind":1024,"name":"dh_params_file_name","url":"interfaces/appoptions.html#dh_params_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":49,"kind":1024,"name":"ssl_prefer_low_memory_usage","url":"interfaces/appoptions.html#ssl_prefer_low_memory_usage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":50,"kind":256,"name":"TemplatedApp","url":"interfaces/templatedapp.html","classes":"tsd-kind-interface"},{"id":51,"kind":2048,"name":"listen","url":"interfaces/templatedapp.html#listen","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":52,"kind":2048,"name":"get","url":"interfaces/templatedapp.html#get","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":53,"kind":2048,"name":"post","url":"interfaces/templatedapp.html#post","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":54,"kind":2048,"name":"options","url":"interfaces/templatedapp.html#options","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":55,"kind":2048,"name":"del","url":"interfaces/templatedapp.html#del","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":56,"kind":2048,"name":"patch","url":"interfaces/templatedapp.html#patch","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":57,"kind":2048,"name":"put","url":"interfaces/templatedapp.html#put","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":58,"kind":2048,"name":"head","url":"interfaces/templatedapp.html#head","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":59,"kind":2048,"name":"connect","url":"interfaces/templatedapp.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":60,"kind":2048,"name":"trace","url":"interfaces/templatedapp.html#trace","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":61,"kind":2048,"name":"any","url":"interfaces/templatedapp.html#any","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":62,"kind":2048,"name":"ws","url":"interfaces/templatedapp.html#ws","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":63,"kind":2048,"name":"publish","url":"interfaces/templatedapp.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":64,"kind":4194304,"name":"RecognizedString","url":"index.html#recognizedstring","classes":"tsd-kind-type-alias"},{"id":65,"kind":64,"name":"App","url":"index.html#app","classes":"tsd-kind-function"},{"id":66,"kind":64,"name":"SSLApp","url":"index.html#sslapp","classes":"tsd-kind-function"},{"id":67,"kind":64,"name":"us_listen_socket_close","url":"index.html#us_listen_socket_close","classes":"tsd-kind-function"},{"id":68,"kind":4194304,"name":"CompressOptions","url":"index.html#compressoptions","classes":"tsd-kind-type-alias"},{"id":69,"kind":32,"name":"DISABLED","url":"index.html#disabled","classes":"tsd-kind-variable"},{"id":70,"kind":32,"name":"SHARED_COMPRESSOR","url":"index.html#shared_compressor","classes":"tsd-kind-variable"},{"id":71,"kind":32,"name":"DEDICATED_COMPRESSOR","url":"index.html#dedicated_compressor","classes":"tsd-kind-variable"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"32":"Variable","64":"Function","256":"Interface","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":256,"name":"us_listen_socket","url":"interfaces/us_listen_socket.html","classes":"tsd-kind-interface"},{"id":1,"kind":256,"name":"WebSocket","url":"interfaces/websocket.html","classes":"tsd-kind-interface"},{"id":2,"kind":2048,"name":"send","url":"interfaces/websocket.html#send","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":3,"kind":2048,"name":"getBufferedAmount","url":"interfaces/websocket.html#getbufferedamount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":4,"kind":2048,"name":"end","url":"interfaces/websocket.html#end","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":5,"kind":2048,"name":"close","url":"interfaces/websocket.html#close","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":6,"kind":2048,"name":"subscribe","url":"interfaces/websocket.html#subscribe","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":7,"kind":2048,"name":"unsubscribe","url":"interfaces/websocket.html#unsubscribe","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":8,"kind":2048,"name":"publish","url":"interfaces/websocket.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":9,"kind":2048,"name":"cork","url":"interfaces/websocket.html#cork","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":10,"kind":2048,"name":"getRemoteAddress","url":"interfaces/websocket.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"WebSocket"},{"id":11,"kind":256,"name":"HttpResponse","url":"interfaces/httpresponse.html","classes":"tsd-kind-interface"},{"id":12,"kind":2048,"name":"writeStatus","url":"interfaces/httpresponse.html#writestatus","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":13,"kind":2048,"name":"writeHeader","url":"interfaces/httpresponse.html#writeheader","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":14,"kind":2048,"name":"write","url":"interfaces/httpresponse.html#write","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":15,"kind":2048,"name":"end","url":"interfaces/httpresponse.html#end","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":16,"kind":2048,"name":"tryEnd","url":"interfaces/httpresponse.html#tryend","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":17,"kind":2048,"name":"close","url":"interfaces/httpresponse.html#close","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":18,"kind":2048,"name":"getWriteOffset","url":"interfaces/httpresponse.html#getwriteoffset","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":19,"kind":2048,"name":"onWritable","url":"interfaces/httpresponse.html#onwritable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":20,"kind":2048,"name":"onAborted","url":"interfaces/httpresponse.html#onaborted","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":21,"kind":2048,"name":"onData","url":"interfaces/httpresponse.html#ondata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":22,"kind":2048,"name":"getRemoteAddress","url":"interfaces/httpresponse.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":23,"kind":2048,"name":"cork","url":"interfaces/httpresponse.html#cork","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpResponse"},{"id":24,"kind":256,"name":"HttpRequest","url":"interfaces/httprequest.html","classes":"tsd-kind-interface"},{"id":25,"kind":2048,"name":"getHeader","url":"interfaces/httprequest.html#getheader","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":26,"kind":2048,"name":"getParameter","url":"interfaces/httprequest.html#getparameter","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":27,"kind":2048,"name":"getUrl","url":"interfaces/httprequest.html#geturl","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":28,"kind":2048,"name":"getMethod","url":"interfaces/httprequest.html#getmethod","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":29,"kind":2048,"name":"getQuery","url":"interfaces/httprequest.html#getquery","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":30,"kind":2048,"name":"forEach","url":"interfaces/httprequest.html#foreach","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":31,"kind":2048,"name":"setYield","url":"interfaces/httprequest.html#setyield","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"HttpRequest"},{"id":32,"kind":256,"name":"WebSocketBehavior","url":"interfaces/websocketbehavior.html","classes":"tsd-kind-interface"},{"id":33,"kind":1024,"name":"maxPayloadLength","url":"interfaces/websocketbehavior.html#maxpayloadlength","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":34,"kind":1024,"name":"idleTimeout","url":"interfaces/websocketbehavior.html#idletimeout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":35,"kind":1024,"name":"compression","url":"interfaces/websocketbehavior.html#compression","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":36,"kind":1024,"name":"maxBackpressure","url":"interfaces/websocketbehavior.html#maxbackpressure","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":37,"kind":1024,"name":"open","url":"interfaces/websocketbehavior.html#open","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":38,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#open.__type-3","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.open"},{"id":39,"kind":1024,"name":"message","url":"interfaces/websocketbehavior.html#message","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":40,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#message.__type-2","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.message"},{"id":41,"kind":1024,"name":"drain","url":"interfaces/websocketbehavior.html#drain","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":42,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#drain.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.drain"},{"id":43,"kind":1024,"name":"close","url":"interfaces/websocketbehavior.html#close","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WebSocketBehavior"},{"id":44,"kind":65536,"name":"__type","url":"interfaces/websocketbehavior.html#close.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"WebSocketBehavior.close"},{"id":45,"kind":256,"name":"AppOptions","url":"interfaces/appoptions.html","classes":"tsd-kind-interface"},{"id":46,"kind":1024,"name":"key_file_name","url":"interfaces/appoptions.html#key_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":47,"kind":1024,"name":"cert_file_name","url":"interfaces/appoptions.html#cert_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":48,"kind":1024,"name":"passphrase","url":"interfaces/appoptions.html#passphrase","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":49,"kind":1024,"name":"dh_params_file_name","url":"interfaces/appoptions.html#dh_params_file_name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":50,"kind":1024,"name":"ssl_prefer_low_memory_usage","url":"interfaces/appoptions.html#ssl_prefer_low_memory_usage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"AppOptions"},{"id":51,"kind":256,"name":"TemplatedApp","url":"interfaces/templatedapp.html","classes":"tsd-kind-interface"},{"id":52,"kind":2048,"name":"listen","url":"interfaces/templatedapp.html#listen","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":53,"kind":2048,"name":"get","url":"interfaces/templatedapp.html#get","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":54,"kind":2048,"name":"post","url":"interfaces/templatedapp.html#post","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":55,"kind":2048,"name":"options","url":"interfaces/templatedapp.html#options","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":56,"kind":2048,"name":"del","url":"interfaces/templatedapp.html#del","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":57,"kind":2048,"name":"patch","url":"interfaces/templatedapp.html#patch","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":58,"kind":2048,"name":"put","url":"interfaces/templatedapp.html#put","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":59,"kind":2048,"name":"head","url":"interfaces/templatedapp.html#head","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":60,"kind":2048,"name":"connect","url":"interfaces/templatedapp.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":61,"kind":2048,"name":"trace","url":"interfaces/templatedapp.html#trace","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":62,"kind":2048,"name":"any","url":"interfaces/templatedapp.html#any","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":63,"kind":2048,"name":"ws","url":"interfaces/templatedapp.html#ws","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":64,"kind":2048,"name":"publish","url":"interfaces/templatedapp.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"TemplatedApp"},{"id":65,"kind":4194304,"name":"RecognizedString","url":"index.html#recognizedstring","classes":"tsd-kind-type-alias"},{"id":66,"kind":64,"name":"App","url":"index.html#app","classes":"tsd-kind-function"},{"id":67,"kind":64,"name":"SSLApp","url":"index.html#sslapp","classes":"tsd-kind-function"},{"id":68,"kind":64,"name":"us_listen_socket_close","url":"index.html#us_listen_socket_close","classes":"tsd-kind-function"},{"id":69,"kind":4194304,"name":"CompressOptions","url":"index.html#compressoptions","classes":"tsd-kind-type-alias"},{"id":70,"kind":32,"name":"DISABLED","url":"index.html#disabled","classes":"tsd-kind-variable"},{"id":71,"kind":32,"name":"SHARED_COMPRESSOR","url":"index.html#shared_compressor","classes":"tsd-kind-variable"},{"id":72,"kind":32,"name":"DEDICATED_COMPRESSOR","url":"index.html#dedicated_compressor","classes":"tsd-kind-variable"}]}; \ No newline at end of file diff --git a/docs/generated/index.html b/docs/generated/index.html index 97c8e6f9..43120168 100644 --- a/docs/generated/index.html +++ b/docs/generated/index.html @@ -3,7 +3,7 @@ - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -54,7 +54,7 @@ Globals -

    uWebSockets.js v16.5.0 documentation

    +

    uWebSockets.js v17.0.0 documentation

    @@ -111,7 +111,7 @@
    CompressOptions: number
    @@ -126,7 +126,7 @@
    RecognizedString: string | ArrayBuffer | Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array
    @@ -144,7 +144,7 @@
    DEDICATED_COMPRESSOR: CompressOptions
    @@ -159,7 +159,7 @@
    DISABLED: CompressOptions
    @@ -174,7 +174,7 @@
    SHARED_COMPRESSOR: CompressOptions
    @@ -196,7 +196,7 @@
  • @@ -224,7 +224,7 @@
  • @@ -252,7 +252,7 @@
  • diff --git a/docs/generated/interfaces/appoptions.html b/docs/generated/interfaces/appoptions.html index 9c78bfe7..b174f6e2 100644 --- a/docs/generated/interfaces/appoptions.html +++ b/docs/generated/interfaces/appoptions.html @@ -3,7 +3,7 @@ - AppOptions | uWebSockets.js v16.5.0 documentation + AppOptions | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -104,7 +104,7 @@
    cert_file_name: RecognizedString
    @@ -114,7 +114,7 @@
    dh_params_file_name: RecognizedString
    @@ -124,7 +124,7 @@
    key_file_name: RecognizedString
    @@ -134,7 +134,7 @@
    passphrase: RecognizedString
    @@ -144,7 +144,7 @@
    ssl_prefer_low_memory_usage: boolean
    diff --git a/docs/generated/interfaces/httprequest.html b/docs/generated/interfaces/httprequest.html index dd2d43c0..ae74f5fe 100644 --- a/docs/generated/interfaces/httprequest.html +++ b/docs/generated/interfaces/httprequest.html @@ -3,7 +3,7 @@ - HttpRequest | uWebSockets.js v16.5.0 documentation + HttpRequest | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -110,7 +110,7 @@
  • @@ -159,7 +159,7 @@
  • @@ -187,7 +187,7 @@
  • @@ -209,7 +209,7 @@
  • @@ -237,7 +237,7 @@
  • @@ -259,7 +259,7 @@
  • @@ -281,7 +281,7 @@
  • diff --git a/docs/generated/interfaces/httpresponse.html b/docs/generated/interfaces/httpresponse.html index 567ce0a5..aebd07c4 100644 --- a/docs/generated/interfaces/httpresponse.html +++ b/docs/generated/interfaces/httpresponse.html @@ -3,7 +3,7 @@ - HttpResponse | uWebSockets.js v16.5.0 documentation + HttpResponse | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -124,7 +124,7 @@
  • @@ -146,7 +146,7 @@
  • @@ -195,7 +195,7 @@
  • @@ -223,7 +223,7 @@
  • @@ -245,7 +245,7 @@
  • @@ -267,7 +267,7 @@
  • @@ -310,7 +310,7 @@
  • @@ -359,7 +359,7 @@
  • @@ -407,7 +407,7 @@
  • @@ -438,7 +438,7 @@
  • @@ -466,7 +466,7 @@
  • @@ -497,7 +497,7 @@
  • diff --git a/docs/generated/interfaces/templatedapp.html b/docs/generated/interfaces/templatedapp.html index 6d55eeaa..0ad209e6 100644 --- a/docs/generated/interfaces/templatedapp.html +++ b/docs/generated/interfaces/templatedapp.html @@ -3,7 +3,7 @@ - TemplatedApp | uWebSockets.js v16.5.0 documentation + TemplatedApp | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -116,7 +116,7 @@
  • @@ -168,7 +168,7 @@
  • @@ -220,7 +220,7 @@
  • @@ -272,7 +272,7 @@
  • @@ -324,7 +324,7 @@
  • @@ -377,7 +377,7 @@
  • @@ -420,7 +420,7 @@
  • @@ -469,7 +469,7 @@
  • @@ -521,7 +521,7 @@
  • @@ -573,7 +573,7 @@
  • @@ -625,7 +625,7 @@
  • @@ -662,7 +662,7 @@
  • @@ -714,7 +714,7 @@
  • @@ -766,7 +766,7 @@
  • diff --git a/docs/generated/interfaces/us_listen_socket.html b/docs/generated/interfaces/us_listen_socket.html index 93441242..6c3350dc 100644 --- a/docs/generated/interfaces/us_listen_socket.html +++ b/docs/generated/interfaces/us_listen_socket.html @@ -3,7 +3,7 @@ - us_listen_socket | uWebSockets.js v16.5.0 documentation + us_listen_socket | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    diff --git a/docs/generated/interfaces/websocket.html b/docs/generated/interfaces/websocket.html index 7ad8591a..25a75288 100644 --- a/docs/generated/interfaces/websocket.html +++ b/docs/generated/interfaces/websocket.html @@ -3,7 +3,7 @@ - WebSocket | uWebSockets.js v16.5.0 documentation + WebSocket | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -96,6 +96,7 @@

    Methods

    +
    + +

    cork

    +
      +
    • cork(cb: function): void
    • +
    +
      +
    • + +
      +
      +

      See HttpResponse.cork

      +
      +
      +

      Parameters

      +
        +
      • +
        cb: function
        +
          +
        • +
            +
          • (): void
          • +
          +
            +
          • +

            Returns void

            +
          • +
          +
        • +
        +
      • +
      +

      Returns void

      +
    • +
    +

    end

    @@ -142,7 +183,7 @@
  • @@ -173,7 +214,7 @@
  • @@ -195,7 +236,7 @@
  • @@ -217,7 +258,7 @@
  • @@ -254,7 +295,7 @@
  • @@ -288,7 +329,7 @@
  • @@ -316,7 +357,7 @@
  • @@ -366,6 +407,9 @@
  • close
  • +
  • + cork +
  • end
  • diff --git a/docs/generated/interfaces/websocketbehavior.html b/docs/generated/interfaces/websocketbehavior.html index e8403812..7d56b9bc 100644 --- a/docs/generated/interfaces/websocketbehavior.html +++ b/docs/generated/interfaces/websocketbehavior.html @@ -3,7 +3,7 @@ - WebSocketBehavior | uWebSockets.js v16.5.0 documentation + WebSocketBehavior | uWebSockets.js v17.0.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v16.5.0 documentation + uWebSockets.js v17.0.0 documentation
    @@ -107,7 +107,7 @@
    close: function
    @@ -149,7 +149,7 @@
    compression: CompressOptions
    @@ -164,7 +164,7 @@
    drain: function
    @@ -200,7 +200,7 @@
    idleTimeout: number
    @@ -215,7 +215,7 @@
    maxBackpressure: number
    @@ -230,7 +230,7 @@
    maxPayloadLength: number
    @@ -245,7 +245,7 @@
    message: function
    @@ -287,7 +287,7 @@
    open: function
    diff --git a/docs/index.d.ts b/docs/index.d.ts index 429de8a7..a8f08e36 100644 --- a/docs/index.d.ts +++ b/docs/index.d.ts @@ -31,6 +31,9 @@ export interface WebSocket { /** Publish a message to a topic in MQTT syntax */ publish(topic: RecognizedString, message: RecognizedString, isBinary?: boolean, compress?: boolean) : WebSocket; + /** See HttpResponse.cork */ + cork(cb: () => void) : void; + /** Returns the remote IP address */ getRemoteAddress() : ArrayBuffer; diff --git a/src/HttpResponseWrapper.h b/src/HttpResponseWrapper.h index fd42b413..fc19cc73 100644 --- a/src/HttpResponseWrapper.h +++ b/src/HttpResponseWrapper.h @@ -232,7 +232,7 @@ struct HttpResponseWrapper { } } - /* Takes function, returns this (EXPERIMENTAL) */ + /* Takes function, returns this */ template static void res_cork(const FunctionCallbackInfo &args) { Isolate *isolate = args.GetIsolate(); diff --git a/src/WebSocketWrapper.h b/src/WebSocketWrapper.h index 894a945a..6490e021 100644 --- a/src/WebSocketWrapper.h +++ b/src/WebSocketWrapper.h @@ -138,6 +138,32 @@ struct WebSocketWrapper { } } + /* Takes nothing, returns this */ + /*template + static void uWS_WebSocket_unsubscribeAll(const FunctionCallbackInfo &args) { + Isolate *isolate = args.GetIsolate(); + auto *ws = getWebSocket(args); + if (ws) { + ws->unsubscribeAll(); + args.GetReturnValue().Set(args.Holder()); + } + }*/ + + /* Takes function, returns this */ + template + static void uWS_WebSocket_cork(const FunctionCallbackInfo &args) { + Isolate *isolate = args.GetIsolate(); + auto *ws = getWebSocket(args); + if (ws) { + + ws->cork([cb = Local::Cast(args[0]), isolate]() { + cb->Call(isolate->GetCurrentContext(), isolate->GetCurrentContext()->Global(), 0, nullptr).IsEmpty(); + }); + + args.GetReturnValue().Set(args.Holder()); + } + } + template static Local init(Isolate *isolate) { Local wsTemplateLocal = FunctionTemplate::New(isolate); @@ -157,6 +183,8 @@ struct WebSocketWrapper { wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "subscribe", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_subscribe)); wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "unsubscribe", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_unsubscribe)); wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "publish", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_publish)); + //wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "unsubscribeAll", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_unsubscribeAll)); + wsTemplateLocal->PrototypeTemplate()->Set(String::NewFromUtf8(isolate, "cork", NewStringType::kNormal).ToLocalChecked(), FunctionTemplate::New(isolate, uWS_WebSocket_cork)); /* Create the template */ Local wsObjectLocal = wsTemplateLocal->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();