WebIDLpedia

[DEPRECATED] TCPSocket interface

As of August 1, 2023, this name is no longer defined by a Web Platform specification

Definition

Direct Sockets API defines TCPSocket

[Exposed=(Window,Worker), SecureContext]
interface TCPSocket {
  constructor(DOMString remoteAddress,
              unsigned short remotePort,
              optional TCPSocketOptions options = {});

  readonly attribute Promise<TCPSocketOpenInfo> opened;
  readonly attribute Promise<undefined> closed;

  Promise<undefined> close();
};

Methods and attributes that return objects implementing TCPSocket