blob: f39984569abc4ae1fa8b3f4877b45daf7d4cc948 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://github.com/WICG/direct-sockets/blob/main/docs/explainer.md#udp
[
Exposed=(Window,Worker),
ActiveScriptWrappable,
SecureContext,
DirectSocketEnabled
] interface UDPSocket {
[CallWith=ScriptState, RaisesException]
constructor(DOMString address, unsigned short port, optional UDPSocketOptions options = {});
[CallWith=ScriptState] readonly attribute Promise<UDPSocketOpenInfo> opened;
[CallWith=ScriptState] readonly attribute Promise<void> closed;
[CallWith=ScriptState, RaisesException, Measure]
Promise<void> close();
};