| // 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/raw-sockets/blob/master/docs/explainer.md#tcp |
| |
| [ |
| Exposed=Window, |
| RuntimeEnabled=DirectSockets, |
| SecureContext |
| ] interface TCPSocket { |
| [RaisesException, CallWith=ScriptState, Measure] |
| Promise<void> close(); |
| |
| [Measure] readonly attribute DOMString remoteAddress; |
| [Measure] readonly attribute unsigned short remotePort; |
| [Measure] readonly attribute ReadableStream readable; |
| [Measure] readonly attribute WritableStream writable; |
| }; |