diff options
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index ed7e682f1..62426ca35 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -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. * @@ -852,11 +852,51 @@ declare namespace Deno { /** **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. * * @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. |