// 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 DirectSockets, DedicatedWorker DirectSockets, SharedWorker DirectSocketsInSharedWorkers, ServiceWorker DirectSocketsInServiceWorkers ), SecureContext ] interface TCPServerSocket { [CallWith=ScriptState, RaisesException, MeasureAs=TCPServerSocketConstructor] constructor(DOMString localAddress, optional TCPServerSocketOptions options = {}); [CallWith=ScriptState, MeasureAs=TCPServerSocketOpenedAttribute] readonly attribute Promise opened; [CallWith=ScriptState, MeasureAs=TCPServerSocketClosedAttribute] readonly attribute Promise closed; [CallWith=ScriptState, RaisesException, MeasureAs=TCPServerSocketCloseFunction] Promise close(); };