// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
Exposed=(Window,DedicatedWorker),
SecureContext,
RuntimeEnabled=DirectSockets,
IsolatedContext
] interface TCPServerSocket {
[CallWith=ScriptState, RaisesException, MeasureAs=TCPServerSocketConstructor]
constructor(DOMString localAddress, optional TCPServerSocketOptions options = {});
[CallWith=ScriptState, MeasureAs=TCPServerSocketOpenedAttribute]
readonly attribute Promise<TCPServerSocketOpenInfo> opened;
[CallWith=ScriptState, MeasureAs=TCPServerSocketClosedAttribute]
readonly attribute Promise<undefined> closed;
[CallWith=ScriptState, RaisesException, MeasureAs=TCPServerSocketCloseFunction]
Promise<undefined> close();
};