From 8591a224cf4e3809aaabf9c68ce81b910bba88af Mon Sep 17 00:00:00 2001 From: alexhultman-2fa <58995996+alexhultman-2fa@users.noreply.github.com> Date: Wed, 9 Jun 2021 11:15:48 +0200 Subject: [PATCH] Document us_socket_local_port --- docs/index.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/index.d.ts b/docs/index.d.ts index 7b259f7..191fa86 100644 --- a/docs/index.d.ts +++ b/docs/index.d.ts @@ -12,13 +12,20 @@ * limitations under the License. */ -/** Native type representing a raw uSockets struct us_listen_socket. +/** Native type representing a raw uSockets struct us_listen_socket_t. * Careful with this one, it is entirely unchecked and native so invalid usage will blow up. */ export interface us_listen_socket { } +/** Native type representing a raw uSockets struct us_socket_t. + * Careful with this one, it is entirely unchecked and native so invalid usage will blow up. + */ +export interface us_socket { + +} + /** Native type representing a raw uSockets struct us_socket_context_t. * Used while upgrading a WebSocket manually. */ export interface us_socket_context_t { @@ -312,6 +319,9 @@ export function SSLApp(options: AppOptions): TemplatedApp; /** Closes a uSockets listen socket. */ export function us_listen_socket_close(listenSocket: us_listen_socket): void; +/** Gets local port of socket (or listenSocket) or -1. */ +export function us_socket_local_port(socket: us_socket): number; + export interface MultipartField { data: ArrayBuffer; name: string;