mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
feat: Stabilize Deno.listen for 'unix' transport (#21938)
This commit is contained in:
parent
052fd78690
commit
01b6e38baf
2 changed files with 26 additions and 29 deletions
29
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
29
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1058,18 +1058,6 @@ declare namespace Deno {
|
|||
reusePort?: boolean;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Unstable options which can be set when opening a Unix listener via
|
||||
* {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
export interface UnixListenOptions {
|
||||
/** A path to the Unix Socket. */
|
||||
path: string;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Unstable options which can be set when opening a datagram listener via
|
||||
|
@ -1091,23 +1079,6 @@ declare namespace Deno {
|
|||
loopback?: boolean;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Listen announces on the local transport address.
|
||||
*
|
||||
* ```ts
|
||||
* const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" })
|
||||
* ```
|
||||
*
|
||||
* Requires `allow-read` and `allow-write` permission.
|
||||
*
|
||||
* @tags allow-read, allow-write
|
||||
* @category Network
|
||||
*/
|
||||
export function listen(
|
||||
options: UnixListenOptions & { transport: "unix" },
|
||||
): Listener;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Listen announces on the local transport address.
|
||||
|
|
26
ext/net/lib.deno_net.d.ts
vendored
26
ext/net/lib.deno_net.d.ts
vendored
|
@ -138,6 +138,32 @@ declare namespace Deno {
|
|||
options: TcpListenOptions & { transport?: "tcp" },
|
||||
): Listener;
|
||||
|
||||
/** Options which can be set when opening a Unix listener via
|
||||
* {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
export interface UnixListenOptions {
|
||||
/** A path to the Unix Socket. */
|
||||
path: string;
|
||||
}
|
||||
|
||||
/** Listen announces on the local transport address.
|
||||
*
|
||||
* ```ts
|
||||
* const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" })
|
||||
* ```
|
||||
*
|
||||
* Requires `allow-read` and `allow-write` permission.
|
||||
*
|
||||
* @tags allow-read, allow-write
|
||||
* @category Network
|
||||
*/
|
||||
// deno-lint-ignore adjacent-overload-signatures
|
||||
export function listen(
|
||||
options: UnixListenOptions & { transport: "unix" },
|
||||
): Listener;
|
||||
|
||||
/** @category Network */
|
||||
export interface ListenTlsOptions extends TcpListenOptions {
|
||||
/** Server private key in PEM format */
|
||||
|
|
Loading…
Add table
Reference in a new issue