mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
parent
cd53ab5427
commit
4c34a2f2df
5 changed files with 409 additions and 4 deletions
49
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
49
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -163,7 +163,7 @@ declare namespace Deno {
|
|||
*/
|
||||
type ToNativeResultType<T extends NativeResultType = NativeResultType> =
|
||||
T extends NativeStructType ? BufferSource
|
||||
: ToNativeResultTypeMap[Exclude<T, NativeStructType>];
|
||||
: ToNativeResultTypeMap[Exclude<T, NativeStructType>];
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
|
@ -225,7 +225,7 @@ declare namespace Deno {
|
|||
*/
|
||||
type FromNativeResultType<T extends NativeResultType = NativeResultType> =
|
||||
T extends NativeStructType ? Uint8Array
|
||||
: FromNativeResultTypeMap[Exclude<T, NativeStructType>];
|
||||
: FromNativeResultTypeMap[Exclude<T, NativeStructType>];
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
|
@ -850,6 +850,34 @@ declare namespace Deno {
|
|||
options: CreateHttpClientOptions,
|
||||
): HttpClient;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Represents membership of a IPv4 multicast group.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
interface MulticastV4Membership {
|
||||
/** Leaves the multicast group. */
|
||||
leave: () => Promise<void>;
|
||||
/** Sets the multicast loopback option. If enabled, multicast packets will be looped back to the local socket. */
|
||||
setLoopback: (loopback: boolean) => Promise<void>;
|
||||
/** Sets the time-to-live of outgoing multicast packets for this socket. */
|
||||
setTTL: (ttl: number) => Promise<void>;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Represents membership of a IPv6 multicast group.
|
||||
*
|
||||
* @category Network
|
||||
*/
|
||||
interface MulticastV6Membership {
|
||||
/** Leaves the multicast group. */
|
||||
leave: () => Promise<void>;
|
||||
/** Sets the multicast loopback option. If enabled, multicast packets will be looped back to the local socket. */
|
||||
setLoopback: (loopback: boolean) => Promise<void>;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* A generic transport listener for message-oriented protocols.
|
||||
|
@ -857,6 +885,18 @@ declare namespace Deno {
|
|||
* @category Network
|
||||
*/
|
||||
export interface DatagramConn extends AsyncIterable<[Uint8Array, Addr]> {
|
||||
/** Joins an IPv4 multicast group. */
|
||||
joinMulticastV4(
|
||||
address: string,
|
||||
networkInterface: string,
|
||||
): Promise<MulticastV4Membership>;
|
||||
|
||||
/** Joins an IPv6 multicast group. */
|
||||
joinMulticastV6(
|
||||
address: string,
|
||||
networkInterface: number,
|
||||
): Promise<MulticastV6Membership>;
|
||||
|
||||
/** Waits for and resolves to the next message to the instance.
|
||||
*
|
||||
* Messages are received in the format of a tuple containing the data array
|
||||
|
@ -918,6 +958,11 @@ declare namespace Deno {
|
|||
*
|
||||
* @default {false} */
|
||||
reuseAddress?: boolean;
|
||||
|
||||
/** When `true`, sent multicast packets will be looped back to the local socket.
|
||||
*
|
||||
* @default {false} */
|
||||
loopback?: boolean;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue