mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix: vsock nits (#28851)
This commit is contained in:
parent
5b25eeda57
commit
e73ed03373
6 changed files with 54 additions and 21 deletions
24
cli/tsc/dts/lib.deno_net.d.ts
vendored
24
cli/tsc/dts/lib.deno_net.d.ts
vendored
|
@ -18,7 +18,10 @@ declare namespace Deno {
|
|||
path: string;
|
||||
}
|
||||
|
||||
/** @category Network */
|
||||
/**
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
* @category Network
|
||||
*/
|
||||
export interface VsockAddr {
|
||||
transport: "vsock";
|
||||
cid: number;
|
||||
|
@ -74,7 +77,9 @@ declare namespace Deno {
|
|||
*/
|
||||
export type UnixListener = Listener<UnixConn, UnixAddr>;
|
||||
|
||||
/** Specialized listener that accepts Vsock connections.
|
||||
/** Specialized listener that accepts VSOCK connections.
|
||||
*
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
|
@ -236,9 +241,11 @@ declare namespace Deno {
|
|||
options: UnixListenOptions & { transport: "unix" },
|
||||
): UnixListener;
|
||||
|
||||
/** Options which can be set when opening a vsock listener via
|
||||
/** Options which can be set when opening a VSOCK listener via
|
||||
* {@linkcode Deno.listen}.
|
||||
*
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
export interface VsockListenOptions {
|
||||
|
@ -247,6 +254,10 @@ declare namespace Deno {
|
|||
}
|
||||
|
||||
/** Listen announces on the local transport address.
|
||||
*
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* The VSOCK address family facilitates communication between virtual machines and the host they are running on: https://man7.org/linux/man-pages/man7/vsock.7.html
|
||||
*
|
||||
* ```ts
|
||||
* const listener = Deno.listen({ cid: -1, port: 80, transport: "vsock" })
|
||||
|
@ -389,7 +400,10 @@ declare namespace Deno {
|
|||
// deno-lint-ignore adjacent-overload-signatures
|
||||
export function connect(options: UnixConnectOptions): Promise<UnixConn>;
|
||||
|
||||
/** @category Network */
|
||||
/**
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
* @category Network
|
||||
*/
|
||||
export interface VsockConnectOptions {
|
||||
transport: "vsock";
|
||||
cid: number;
|
||||
|
@ -402,6 +416,8 @@ declare namespace Deno {
|
|||
/** Connects to the hostname (default is "127.0.0.1") and port on the named
|
||||
* transport (default is "tcp"), and resolves to the connection (`Conn`).
|
||||
*
|
||||
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* ```ts
|
||||
* const conn1 = await Deno.connect({ port: 80 });
|
||||
* const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue