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 @@
-
uWebSockets.js v15.1.0 documentation (WIP & incomplete)
+uWebSockets.js v15.6.0 documentation
Type aliases
++- Recognized
String
+
+Functions
@@ -94,6 +100,24 @@
Type aliases
+RecognizedString
+Recognized string types, things C++ can read and understand as strings
+Functions
Optional cert_file_name
-Optional dh_params_file_name
-Optional key_file_name
-Optional passphrase
-getHeader
-- get
Header(lowerCaseKey: string): string
+ - get
Header(lowerCaseKey: RecognizedString): string
Parameters
lowerCaseKey: string
+lowerCaseKey: RecognizedString
Returns string
@@ -136,7 +136,7 @@end
-- end(body: string | ArrayBuffer): HttpResponse
+ - end(body: RecognizedString): HttpResponse
Parameters
body: string | ArrayBuffer
+body: RecognizedString
Returns HttpResponse
+getRemoteAddress
++- get
RemoteAddress(): ArrayBuffer
+
++-
+
+
+
+
+
+
+
+Returns the remote IP address
+Returns ArrayBuffer
+getWriteOffset
@@ -163,7 +186,7 @@tryEnd
-- try
End(fullBodyOrChunk: string, totalSize: number): [boolean, boolean]
+ - try
End(fullBodyOrChunk: RecognizedString, totalSize: number): [boolean, boolean]
Parameters
fullBodyOrChunk: string
+fullBodyOrChunk: RecognizedString
totalSize: number
@@ -359,13 +382,13 @@write
-- write(chunk: string | ArrayBuffer): HttpResponse
+ - write(chunk: RecognizedString): HttpResponse
Parameters
chunk: string | ArrayBuffer
+chunk: RecognizedString
Returns HttpResponse
@@ -387,13 +410,13 @@writeHeader
-- write
Header(key: string | ArrayBuffer, value: string | ArrayBuffer): HttpResponse
+ - write
Header(key: RecognizedString, value: RecognizedString): HttpResponse
Parameters
key: string | ArrayBuffer
+key: RecognizedString
value: string | ArrayBuffer
+value: RecognizedString
Returns HttpResponse
@@ -418,13 +441,13 @@writeStatus
-- write
Status(status: string | ArrayBuffer): HttpResponse
+ - write
Status(status: RecognizedString): HttpResponse
Parameters
status: string | ArrayBuffer
+status: RecognizedString
Returns HttpResponse
@@ -474,6 +497,9 @@any
-- any(pattern: string, handler: function): TemplatedApp
+ - any(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -161,13 +161,13 @@connect
-- connect(pattern: string, handler: function): TemplatedApp
+ - connect(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -213,13 +213,13 @@del
-- del(pattern: string, handler: function): TemplatedApp
+ - del(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -265,13 +265,13 @@get
-- get(pattern: string, handler: function): TemplatedApp
+ - get(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -317,13 +317,13 @@head
-- head(pattern: string, handler: function): TemplatedApp
+ - head(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -369,14 +369,14 @@listen
-- listen(host: string, port: number, cb: function): TemplatedApp
+ - listen(host: RecognizedString, port: number, cb: function): TemplatedApp
- listen(port: number, cb: function): TemplatedApp
Parameters
host: string
+host: RecognizedString
port: number
@@ -419,7 +419,7 @@options
-- options(pattern: string, handler: function): TemplatedApp
+ - options(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -514,13 +514,13 @@patch
-- patch(pattern: string, handler: function): TemplatedApp
+ - patch(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -566,13 +566,13 @@post
-- post(pattern: string, handler: function): TemplatedApp
+ - post(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -618,13 +618,13 @@put
-- put(pattern: string, handler: function): TemplatedApp
+ - put(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -670,13 +670,13 @@trace
-- trace(pattern: string, handler: function): TemplatedApp
+ - trace(pattern: RecognizedString, handler: function): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
handler: function
@@ -722,13 +722,13 @@ws
-- ws(pattern: string, behavior: WebSocketBehavior): TemplatedApp
+ - ws(pattern: RecognizedString, behavior: WebSocketBehavior): TemplatedApp
Parameters
pattern: string
+pattern: RecognizedString
behavior: WebSocketBehavior
@@ -827,6 +827,9 @@+-
+ Recognized
String
+
-
App
diff --git a/docs/generated/interfaces/websocket.html b/docs/generated/interfaces/websocket.html
index c29bb62..702a76f 100644
--- a/docs/generated/interfaces/websocket.html
+++ b/docs/generated/interfaces/websocket.html
@@ -3,7 +3,7 @@
- WebSocket | uWebSockets.js v15.1.0 documentation (WIP & incomplete)
+ WebSocket | 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 documentationend
-- end(code: number, shortMessage: string | ArrayBuffer): WebSocket
+ - end(code: number, shortMessage: RecognizedString): WebSocket
code: number
shortMessage: string | ArrayBuffer
+shortMessage: RecognizedString
Returns WebSocket
@@ -163,7 +164,7 @@publish
+ +getRemoteAddress
-- publish(topic: string | ArrayBuffer, message: string | ArrayBuffer): WebSocket
+ - get
RemoteAddress(): ArrayBuffer
Returns the remote IP address
+Returns ArrayBuffer
+publish
++- publish(topic: RecognizedString, message: RecognizedString): WebSocket
+
++-
+
@@ -196,10 +219,10 @@
-
-
-
-
-
@@ -227,7 +250,7 @@
-
-
-
-
@@ -261,7 +284,7 @@
-
-
-
@@ -289,7 +312,7 @@
-
-
-
get
BufferedAmount
+ -
+ get
RemoteAddress
+
-
publish
@@ -359,6 +385,9 @@
-
us_
listen_socket
+ -
+ Recognized
String
+
-
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 @@
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
+ -
+ Recognized
String
+
-
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 */
Parameters
topic: string | ArrayBuffer
+topic: RecognizedString
message: string | ArrayBuffer
+message: RecognizedString
Returns WebSocket
@@ -210,13 +233,13 @@send
-- send(message: string | ArrayBuffer, isBinary: boolean, compress: boolean): boolean
+ - send(message: RecognizedString, isBinary: boolean, compress: boolean): boolean
Parameters
message: string | ArrayBuffer
+message: RecognizedString
isBinary: boolean
@@ -244,13 +267,13 @@subscribe
-- subscribe(topic: string | ArrayBuffer): WebSocket
+ - subscribe(topic: RecognizedString): WebSocket
Parameters
topic: string | ArrayBuffer
+topic: RecognizedString
Returns WebSocket
@@ -272,13 +295,13 @@unsubscribe
-- unsubscribe(topic: string | ArrayBuffer): WebSocket
+ - unsubscribe(topic: RecognizedString): WebSocket
Parameters
topic: string | ArrayBuffer
+topic: RecognizedString
Returns WebSocket
@@ -337,6 +360,9 @@Optional compression
-