diff --git a/docs/Makefile b/docs/Makefile index 566beb8..2135d76 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,2 +1,2 @@ default: - typedoc --out generated --includeDeclarations --excludeExternals --name "uWebSockets.js v15.1.0 documentation (WIP & incomplete)" --mode file --readme none . + typedoc --out generated --includeDeclarations --excludeExternals --name "uWebSockets.js v15.6.0 documentation" --mode file --readme none . diff --git a/docs/generated/assets/js/search.js b/docs/generated/assets/js/search.js index d74ad10..5256a53 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":{"4":"Enumeration","16":"Enumeration member","64":"Function","256":"Interface","1024":"Property","2048":"Method","65536":"Type literal"},"rows":[{"id":0,"kind":256,"name":"us_listen_socket","url":"interfaces/us_listen_socket.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":1,"kind":256,"name":"WebSocket","url":"interfaces/websocket.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":2,"kind":2048,"name":"send","url":"interfaces/websocket.html#send","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":3,"kind":2048,"name":"getBufferedAmount","url":"interfaces/websocket.html#getbufferedamount","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":4,"kind":2048,"name":"end","url":"interfaces/websocket.html#end","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":5,"kind":2048,"name":"close","url":"interfaces/websocket.html#close","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":6,"kind":2048,"name":"subscribe","url":"interfaces/websocket.html#subscribe","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":7,"kind":2048,"name":"publish","url":"interfaces/websocket.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":8,"kind":2048,"name":"unsubscribe","url":"interfaces/websocket.html#unsubscribe","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":9,"kind":256,"name":"HttpResponse","url":"interfaces/httpresponse.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":10,"kind":2048,"name":"writeStatus","url":"interfaces/httpresponse.html#writestatus","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":11,"kind":2048,"name":"writeHeader","url":"interfaces/httpresponse.html#writeheader","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":12,"kind":2048,"name":"write","url":"interfaces/httpresponse.html#write","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":13,"kind":2048,"name":"end","url":"interfaces/httpresponse.html#end","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":14,"kind":2048,"name":"tryEnd","url":"interfaces/httpresponse.html#tryend","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":15,"kind":2048,"name":"close","url":"interfaces/httpresponse.html#close","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":16,"kind":2048,"name":"getWriteOffset","url":"interfaces/httpresponse.html#getwriteoffset","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":17,"kind":2048,"name":"onWritable","url":"interfaces/httpresponse.html#onwritable","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":18,"kind":2048,"name":"onAborted","url":"interfaces/httpresponse.html#onaborted","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":19,"kind":2048,"name":"onData","url":"interfaces/httpresponse.html#ondata","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":20,"kind":256,"name":"HttpRequest","url":"interfaces/httprequest.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":21,"kind":2048,"name":"getHeader","url":"interfaces/httprequest.html#getheader","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":22,"kind":2048,"name":"getParameter","url":"interfaces/httprequest.html#getparameter","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":23,"kind":2048,"name":"getUrl","url":"interfaces/httprequest.html#geturl","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":24,"kind":2048,"name":"getMethod","url":"interfaces/httprequest.html#getmethod","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":25,"kind":2048,"name":"getQuery","url":"interfaces/httprequest.html#getquery","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":26,"kind":256,"name":"WebSocketBehavior","url":"interfaces/websocketbehavior.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":27,"kind":1024,"name":"maxPayloadLength","url":"interfaces/websocketbehavior.html#maxpayloadlength","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":28,"kind":1024,"name":"idleTimeout","url":"interfaces/websocketbehavior.html#idletimeout","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":29,"kind":1024,"name":"compression","url":"interfaces/websocketbehavior.html#compression","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":30,"kind":1024,"name":"open","url":"interfaces/websocketbehavior.html#open","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":31,"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":32,"kind":1024,"name":"message","url":"interfaces/websocketbehavior.html#message","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":33,"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":34,"kind":1024,"name":"drain","url":"interfaces/websocketbehavior.html#drain","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":35,"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":36,"kind":1024,"name":"close","url":"interfaces/websocketbehavior.html#close","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":37,"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":38,"kind":256,"name":"AppOptions","url":"interfaces/appoptions.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":39,"kind":1024,"name":"key_file_name","url":"interfaces/appoptions.html#key_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":40,"kind":1024,"name":"cert_file_name","url":"interfaces/appoptions.html#cert_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":41,"kind":1024,"name":"passphrase","url":"interfaces/appoptions.html#passphrase","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":42,"kind":1024,"name":"dh_params_file_name","url":"interfaces/appoptions.html#dh_params_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":43,"kind":256,"name":"TemplatedApp","url":"interfaces/templatedapp.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":44,"kind":2048,"name":"listen","url":"interfaces/templatedapp.html#listen","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":45,"kind":2048,"name":"get","url":"interfaces/templatedapp.html#get","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":46,"kind":2048,"name":"post","url":"interfaces/templatedapp.html#post","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":47,"kind":2048,"name":"options","url":"interfaces/templatedapp.html#options","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":48,"kind":2048,"name":"del","url":"interfaces/templatedapp.html#del","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":49,"kind":2048,"name":"patch","url":"interfaces/templatedapp.html#patch","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":50,"kind":2048,"name":"put","url":"interfaces/templatedapp.html#put","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":51,"kind":2048,"name":"head","url":"interfaces/templatedapp.html#head","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":52,"kind":2048,"name":"connect","url":"interfaces/templatedapp.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":53,"kind":2048,"name":"trace","url":"interfaces/templatedapp.html#trace","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":54,"kind":2048,"name":"any","url":"interfaces/templatedapp.html#any","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":55,"kind":2048,"name":"ws","url":"interfaces/templatedapp.html#ws","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":56,"kind":4,"name":"CompressOptions","url":"enums/compressoptions.html","classes":"tsd-kind-enum"},{"id":57,"kind":16,"name":"DISABLED","url":"enums/compressoptions.html#disabled","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":58,"kind":16,"name":"SHARED_COMPRESSOR","url":"enums/compressoptions.html#shared_compressor","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":59,"kind":16,"name":"DEDICATED_COMPRESSOR","url":"enums/compressoptions.html#dedicated_compressor","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":60,"kind":64,"name":"App","url":"index.html#app","classes":"tsd-kind-function"},{"id":61,"kind":64,"name":"SSLApp","url":"index.html#sslapp","classes":"tsd-kind-function"},{"id":62,"kind":64,"name":"us_listen_socket_close","url":"index.html#us_listen_socket_close","classes":"tsd-kind-function"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"4":"Enumeration","16":"Enumeration member","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 tsd-is-not-exported"},{"id":1,"kind":256,"name":"WebSocket","url":"interfaces/websocket.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":2,"kind":2048,"name":"send","url":"interfaces/websocket.html#send","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":3,"kind":2048,"name":"getBufferedAmount","url":"interfaces/websocket.html#getbufferedamount","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":4,"kind":2048,"name":"end","url":"interfaces/websocket.html#end","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":5,"kind":2048,"name":"close","url":"interfaces/websocket.html#close","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":6,"kind":2048,"name":"subscribe","url":"interfaces/websocket.html#subscribe","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":7,"kind":2048,"name":"publish","url":"interfaces/websocket.html#publish","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":8,"kind":2048,"name":"unsubscribe","url":"interfaces/websocket.html#unsubscribe","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":9,"kind":2048,"name":"getRemoteAddress","url":"interfaces/websocket.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocket"},{"id":10,"kind":256,"name":"HttpResponse","url":"interfaces/httpresponse.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":11,"kind":2048,"name":"writeStatus","url":"interfaces/httpresponse.html#writestatus","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":12,"kind":2048,"name":"writeHeader","url":"interfaces/httpresponse.html#writeheader","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":13,"kind":2048,"name":"write","url":"interfaces/httpresponse.html#write","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":14,"kind":2048,"name":"end","url":"interfaces/httpresponse.html#end","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":15,"kind":2048,"name":"tryEnd","url":"interfaces/httpresponse.html#tryend","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":16,"kind":2048,"name":"close","url":"interfaces/httpresponse.html#close","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":17,"kind":2048,"name":"getWriteOffset","url":"interfaces/httpresponse.html#getwriteoffset","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":18,"kind":2048,"name":"onWritable","url":"interfaces/httpresponse.html#onwritable","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":19,"kind":2048,"name":"onAborted","url":"interfaces/httpresponse.html#onaborted","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":20,"kind":2048,"name":"onData","url":"interfaces/httpresponse.html#ondata","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":21,"kind":2048,"name":"getRemoteAddress","url":"interfaces/httpresponse.html#getremoteaddress","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpResponse"},{"id":22,"kind":256,"name":"HttpRequest","url":"interfaces/httprequest.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":23,"kind":2048,"name":"getHeader","url":"interfaces/httprequest.html#getheader","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":24,"kind":2048,"name":"getParameter","url":"interfaces/httprequest.html#getparameter","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":25,"kind":2048,"name":"getUrl","url":"interfaces/httprequest.html#geturl","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":26,"kind":2048,"name":"getMethod","url":"interfaces/httprequest.html#getmethod","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":27,"kind":2048,"name":"getQuery","url":"interfaces/httprequest.html#getquery","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"HttpRequest"},{"id":28,"kind":256,"name":"WebSocketBehavior","url":"interfaces/websocketbehavior.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":29,"kind":1024,"name":"maxPayloadLength","url":"interfaces/websocketbehavior.html#maxpayloadlength","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":30,"kind":1024,"name":"idleTimeout","url":"interfaces/websocketbehavior.html#idletimeout","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":31,"kind":1024,"name":"compression","url":"interfaces/websocketbehavior.html#compression","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":32,"kind":1024,"name":"open","url":"interfaces/websocketbehavior.html#open","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":33,"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":34,"kind":1024,"name":"message","url":"interfaces/websocketbehavior.html#message","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":35,"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":36,"kind":1024,"name":"drain","url":"interfaces/websocketbehavior.html#drain","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":37,"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":38,"kind":1024,"name":"close","url":"interfaces/websocketbehavior.html#close","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"WebSocketBehavior"},{"id":39,"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":40,"kind":256,"name":"AppOptions","url":"interfaces/appoptions.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":41,"kind":1024,"name":"key_file_name","url":"interfaces/appoptions.html#key_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":42,"kind":1024,"name":"cert_file_name","url":"interfaces/appoptions.html#cert_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":43,"kind":1024,"name":"passphrase","url":"interfaces/appoptions.html#passphrase","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":44,"kind":1024,"name":"dh_params_file_name","url":"interfaces/appoptions.html#dh_params_file_name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-not-exported","parent":"AppOptions"},{"id":45,"kind":256,"name":"TemplatedApp","url":"interfaces/templatedapp.html","classes":"tsd-kind-interface tsd-is-not-exported"},{"id":46,"kind":2048,"name":"listen","url":"interfaces/templatedapp.html#listen","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":47,"kind":2048,"name":"get","url":"interfaces/templatedapp.html#get","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":48,"kind":2048,"name":"post","url":"interfaces/templatedapp.html#post","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":49,"kind":2048,"name":"options","url":"interfaces/templatedapp.html#options","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":50,"kind":2048,"name":"del","url":"interfaces/templatedapp.html#del","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":51,"kind":2048,"name":"patch","url":"interfaces/templatedapp.html#patch","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":52,"kind":2048,"name":"put","url":"interfaces/templatedapp.html#put","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":53,"kind":2048,"name":"head","url":"interfaces/templatedapp.html#head","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":54,"kind":2048,"name":"connect","url":"interfaces/templatedapp.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":55,"kind":2048,"name":"trace","url":"interfaces/templatedapp.html#trace","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":56,"kind":2048,"name":"any","url":"interfaces/templatedapp.html#any","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":57,"kind":2048,"name":"ws","url":"interfaces/templatedapp.html#ws","classes":"tsd-kind-method tsd-parent-kind-interface tsd-is-not-exported","parent":"TemplatedApp"},{"id":58,"kind":4,"name":"CompressOptions","url":"enums/compressoptions.html","classes":"tsd-kind-enum"},{"id":59,"kind":16,"name":"DISABLED","url":"enums/compressoptions.html#disabled","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":60,"kind":16,"name":"SHARED_COMPRESSOR","url":"enums/compressoptions.html#shared_compressor","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":61,"kind":16,"name":"DEDICATED_COMPRESSOR","url":"enums/compressoptions.html#dedicated_compressor","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"CompressOptions"},{"id":62,"kind":4194304,"name":"RecognizedString","url":"index.html#recognizedstring","classes":"tsd-kind-type-alias tsd-is-not-exported"},{"id":63,"kind":64,"name":"App","url":"index.html#app","classes":"tsd-kind-function"},{"id":64,"kind":64,"name":"SSLApp","url":"index.html#sslapp","classes":"tsd-kind-function"},{"id":65,"kind":64,"name":"us_listen_socket_close","url":"index.html#us_listen_socket_close","classes":"tsd-kind-function"}]}; \ No newline at end of file diff --git a/docs/generated/enums/compressoptions.html b/docs/generated/enums/compressoptions.html index 340ff47..f77c324 100644 --- a/docs/generated/enums/compressoptions.html +++ b/docs/generated/enums/compressoptions.html @@ -3,7 +3,7 @@ - CompressOptions | uWebSockets.js v15.1.0 documentation (WIP & incomplete) + CompressOptions | uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
    @@ -94,7 +94,7 @@
    DEDICATED_COMPRESSOR:
    @@ -109,7 +109,7 @@
    DISABLED:
    @@ -124,7 +124,7 @@
    SHARED_COMPRESSOR:
    @@ -184,6 +184,9 @@
  • us_listen_socket
  • +
  • + RecognizedString +
  • App
  • diff --git a/docs/generated/index.html b/docs/generated/index.html index 9078324..cd83b14 100644 --- a/docs/generated/index.html +++ b/docs/generated/index.html @@ -3,7 +3,7 @@ - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
    @@ -54,7 +54,7 @@ Globals -

    uWebSockets.js v15.1.0 documentation (WIP & incomplete)

    +

    uWebSockets.js v15.6.0 documentation

    @@ -83,6 +83,12 @@
  • us_listen_socket
  • +
    +

    Type aliases

    + +

    Functions

      @@ -94,6 +100,24 @@
    +
    +

    Type aliases

    +
    + +

    RecognizedString

    +
    RecognizedString: string | ArrayBuffer | Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array
    + +
    +
    +

    Recognized string types, things C++ can read and understand as strings

    +
    +
    +
    +

    Functions

    @@ -106,7 +130,7 @@
  • @@ -134,7 +158,7 @@
  • @@ -162,7 +186,7 @@
  • @@ -216,6 +240,9 @@
  • us_listen_socket
  • +
  • + RecognizedString +
  • App
  • diff --git a/docs/generated/interfaces/appoptions.html b/docs/generated/interfaces/appoptions.html index f651672..eadf021 100644 --- a/docs/generated/interfaces/appoptions.html +++ b/docs/generated/interfaces/appoptions.html @@ -3,7 +3,7 @@ - AppOptions | uWebSockets.js v15.1.0 documentation (WIP & incomplete) + AppOptions | uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
    @@ -100,40 +100,40 @@

    Optional cert_file_name

    -
    cert_file_name: string
    +
    cert_file_name: RecognizedString

    Optional dh_params_file_name

    -
    dh_params_file_name: string
    +
    dh_params_file_name: RecognizedString

    Optional key_file_name

    -
    key_file_name: string
    +
    key_file_name: RecognizedString

    Optional passphrase

    -
    passphrase: string
    +
    passphrase: RecognizedString
    @@ -191,6 +191,9 @@
  • us_listen_socket
  • +
  • + RecognizedString +
  • App
  • diff --git a/docs/generated/interfaces/httprequest.html b/docs/generated/interfaces/httprequest.html index bccbb20..61c3a22 100644 --- a/docs/generated/interfaces/httprequest.html +++ b/docs/generated/interfaces/httprequest.html @@ -3,7 +3,7 @@ - HttpRequest | uWebSockets.js v15.1.0 documentation (WIP & incomplete) + HttpRequest | uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
    @@ -102,13 +102,13 @@

    getHeader

      -
    • getHeader(lowerCaseKey: string): string
    • +
    • getHeader(lowerCaseKey: RecognizedString): string
    • @@ -119,7 +119,7 @@

      Parameters

      Returns string

      @@ -136,7 +136,7 @@
    • @@ -158,7 +158,7 @@
    • @@ -186,7 +186,7 @@
    • @@ -208,7 +208,7 @@
    • @@ -277,6 +277,9 @@
    • us_listen_socket
    • +
    • + RecognizedString +
    • App
    • diff --git a/docs/generated/interfaces/httpresponse.html b/docs/generated/interfaces/httpresponse.html index 0bd0acf..da8d43f 100644 --- a/docs/generated/interfaces/httpresponse.html +++ b/docs/generated/interfaces/httpresponse.html @@ -3,7 +3,7 @@ - HttpResponse | uWebSockets.js v15.1.0 documentation (WIP & incomplete) + HttpResponse | uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
    • Preparing search index...
    • The search index is not available
    - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
    @@ -88,6 +88,7 @@
    • close
    • end
    • +
    • getRemoteAddress
    • getWriteOffset
    • onAborted
    • onData
    • @@ -113,7 +114,7 @@
    • @@ -129,13 +130,13 @@

      end

      +
      + +

      getRemoteAddress

      +
        +
      • getRemoteAddress(): ArrayBuffer
      • +
      +
        +
      • + +
        +
        +

        Returns the remote IP address

        +
        +
        +

        Returns ArrayBuffer

        +
      • +
      +

      getWriteOffset

      @@ -163,7 +186,7 @@
    • @@ -185,7 +208,7 @@
    • @@ -234,7 +257,7 @@
    • @@ -286,7 +309,7 @@
    • @@ -328,13 +351,13 @@

      tryEnd

        -
      • tryEnd(fullBodyOrChunk: string, totalSize: number): [boolean, boolean]
      • +
      • tryEnd(fullBodyOrChunk: RecognizedString, totalSize: number): [boolean, boolean]
    • - -

      publish

      + +

      getRemoteAddress

        -
      • publish(topic: string | ArrayBuffer, message: string | ArrayBuffer): WebSocket
      • +
      • getRemoteAddress(): ArrayBuffer
      +
      +
      + +

      publish

      + +
        +
      • +
        @@ -196,10 +219,10 @@

        Parameters

        Returns WebSocket

        @@ -210,13 +233,13 @@

        send

          -
        • send(message: string | ArrayBuffer, isBinary: boolean, compress: boolean): boolean
        • +
        • send(message: RecognizedString, isBinary: boolean, compress: boolean): boolean
        • @@ -227,7 +250,7 @@

          Parameters

          • -
            message: string | ArrayBuffer
            +
            message: RecognizedString
          • isBinary: boolean
            @@ -244,13 +267,13 @@

            subscribe

            • @@ -261,7 +284,7 @@

              Parameters

              Returns WebSocket

              @@ -272,13 +295,13 @@

              unsubscribe

              • @@ -289,7 +312,7 @@

                Parameters

                Returns WebSocket

                @@ -337,6 +360,9 @@
              • getBufferedAmount
              • +
              • + getRemoteAddress +
              • publish
              • @@ -359,6 +385,9 @@
              • us_listen_socket
              • +
              • + RecognizedString +
              • App
              • diff --git a/docs/generated/interfaces/websocketbehavior.html b/docs/generated/interfaces/websocketbehavior.html index 68db2f3..862edd8 100644 --- a/docs/generated/interfaces/websocketbehavior.html +++ b/docs/generated/interfaces/websocketbehavior.html @@ -3,7 +3,7 @@ - WebSocketBehavior | uWebSockets.js v15.1.0 documentation (WIP & incomplete) + WebSocketBehavior | uWebSockets.js v15.6.0 documentation @@ -22,7 +22,7 @@
              • Preparing search index...
              • The search index is not available
              - uWebSockets.js v15.1.0 documentation (WIP & incomplete) + uWebSockets.js v15.6.0 documentation
              @@ -106,7 +106,7 @@
              close: function
              @@ -145,10 +145,10 @@

              Optional compression

              -
              compression: number
              +
              compression: CompressOptions
              @@ -163,7 +163,7 @@
              drain: function
              @@ -199,7 +199,7 @@
              idleTimeout: number
              @@ -214,7 +214,7 @@
              maxPayloadLength: number
              @@ -229,7 +229,7 @@
              message: function
              @@ -271,7 +271,7 @@
              open: function
              @@ -367,6 +367,9 @@
            • us_listen_socket
            • +
            • + RecognizedString +
            • App
            • diff --git a/docs/index.d.ts b/docs/index.d.ts index b36c19a..acfb30a 100644 --- a/docs/index.d.ts +++ b/docs/index.d.ts @@ -5,42 +5,48 @@ interface us_listen_socket { } +/** Recognized string types, things C++ can read and understand as strings */ +type RecognizedString = string | ArrayBuffer | Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array; + /** A WebSocket connection that is valid from open to close event */ interface WebSocket { /** Sends a message. Make sure to check getBufferedAmount() before sending. Returns true for success, false for built up backpressure that will drain when time is given. */ - send(message: string | ArrayBuffer, isBinary: boolean, compress: boolean) : boolean; + send(message: RecognizedString, isBinary: boolean, compress: boolean) : boolean; /** Returns the bytes buffered in backpressure. */ getBufferedAmount() : number; /** Gradefully closes this WebSocket. Immediately calls close handler. */ - end(code: number, shortMessage: string | ArrayBuffer) : WebSocket; + end(code: number, shortMessage: RecognizedString) : WebSocket; /** Forefully closes this WebSocket. Immediately calls close handler. */ close() : WebSocket; /** Subscribe to a topic in MQTT syntax */ - subscribe(topic: string | ArrayBuffer) : WebSocket; + subscribe(topic: RecognizedString) : WebSocket; /** Publish a message to a topic in MQTT syntax */ - publish(topic: string | ArrayBuffer, message: string | ArrayBuffer) : WebSocket; + publish(topic: RecognizedString, message: RecognizedString) : WebSocket; /** Unsubscribe from topic (not implemented yet) */ - unsubscribe(topic: string | ArrayBuffer) : WebSocket; + unsubscribe(topic: RecognizedString) : WebSocket; + + /** Returns the remote IP address */ + getRemoteAddress() : ArrayBuffer; } /** An HttpResponse is valid until either onAborted callback or any of the .end/.tryEnd calls succeed. You may attach user data to this object. */ interface HttpResponse { /** Writes the HTTP status message such as "200 OK". */ - writeStatus(status: string | ArrayBuffer) : HttpResponse; + writeStatus(status: RecognizedString) : HttpResponse; /** Writes key and value to HTTP response. */ - writeHeader(key: string | ArrayBuffer, value: string | ArrayBuffer) : HttpResponse; + writeHeader(key: RecognizedString, value: RecognizedString) : HttpResponse; /** Enters or continues chunked encoding mode. Writes part of the response. End with zero length write. */ - write(chunk: string | ArrayBuffer) : HttpResponse; + write(chunk: RecognizedString) : HttpResponse; /** Ends this response by copying the contents of body. */ - end(body: string | ArrayBuffer) : HttpResponse; + end(body: RecognizedString) : HttpResponse; /** Ends this response, or tries to, by streaming appropriately sized chunks of body. Use in conjunction with onWritable. Returns tuple [ok, hasResponded].*/ - tryEnd(fullBodyOrChunk: string, totalSize: number) : [boolean, boolean]; + tryEnd(fullBodyOrChunk: RecognizedString, totalSize: number) : [boolean, boolean]; /** Immediately force closes the connection. */ close() : HttpResponse; @@ -62,12 +68,15 @@ interface HttpResponse { /** Handler for reading data from POST and such requests. You MUST copy the data of chunk if isLast is not true. We Neuter ArrayBuffers on return, making it zero length.*/ onData(handler: (res: HttpResponse, chunk: ArrayBuffer, isLast: boolean) => void) : HttpResponse; + + /** Returns the remote IP address */ + getRemoteAddress() : ArrayBuffer; } /** An HttpRequest is stack allocated and only accessible during the callback invocation. */ interface HttpRequest { /** Returns the lowercased header value or empty string. */ - getHeader(lowerCaseKey: string) : string; + getHeader(lowerCaseKey: RecognizedString) : string; /** Returns the parsed parameter at index. Corresponds to route. */ getParameter(index: number) : string; /** Returns the URL including initial /slash */ @@ -85,7 +94,7 @@ interface WebSocketBehavior { /** Maximum amount of seconds that may pass without sending or getting a message. */ idleTimeout?: number; /** 0 = no compression, 1 = shared compressor, 2 = dedicated compressor. See C++ project. */ - compression?: number; + compression?: CompressOptions; /** Handler for new WebSocket connection. WebSocket is valid from open to close, no errors. */ open?: (ws: WebSocket, req: HttpRequest) => void; /** Handler for a WebSocket message. */ @@ -98,40 +107,40 @@ interface WebSocketBehavior { /** Options used when constructing an app. */ interface AppOptions { - key_file_name?: string; - cert_file_name?: string; - passphrase?: string; - dh_params_file_name?: string; + key_file_name?: RecognizedString; + cert_file_name?: RecognizedString; + passphrase?: RecognizedString; + dh_params_file_name?: RecognizedString; } /** TemplatedApp is either an SSL or non-SSL app. */ interface TemplatedApp { /** Listens to hostname & port. Callback hands either false or a listen socket. */ - listen(host: string, port: number, cb: (listenSocket: us_listen_socket) => void): TemplatedApp; + listen(host: RecognizedString, port: number, cb: (listenSocket: us_listen_socket) => void): TemplatedApp; /** Listens to port. Callback hands either false or a listen socket. */ listen(port: number, cb: (listenSocket: any) => void): TemplatedApp; /** Registers an HTTP GET handler matching specified URL pattern. */ - get(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + get(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP POST handler matching specified URL pattern. */ - post(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + post(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP OPTIONS handler matching specified URL pattern. */ - options(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + options(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP DELETE handler matching specified URL pattern. */ - del(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + del(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP PATCH handler matching specified URL pattern. */ - patch(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + patch(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP PUT handler matching specified URL pattern. */ - put(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + put(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP HEAD handler matching specified URL pattern. */ - head(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + head(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP CONNECT handler matching specified URL pattern. */ - connect(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + connect(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP TRACE handler matching specified URL pattern. */ - trace(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + trace(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers an HTTP handler matching specified URL pattern on any HTTP method. */ - any(pattern: string, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; + any(pattern: RecognizedString, handler: (res: HttpResponse, req: HttpRequest) => void) : TemplatedApp; /** Registers a handler matching specified URL pattern where WebSocket upgrade requests are caught. */ - ws(pattern: string, behavior: WebSocketBehavior) : TemplatedApp; + ws(pattern: RecognizedString, behavior: WebSocketBehavior) : TemplatedApp; } /** Constructs a non-SSL app */