Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / TCPServerSocket.webidl
blob764a16e43391c1286b2e2622498381e7617f819c
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7  * TCPServerSocket
8  *
9  * An interface to a server socket that can accept incoming connections for gaia apps.
10  */
12 dictionary ServerSocketOptions {
13   TCPSocketBinaryType binaryType = "string";
16 [Constructor(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0),
17  Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
18  Exposed=Window]
19 interface TCPServerSocket : EventTarget {
20   /**
21    * The port of this server socket object.
22    */
23   readonly attribute unsigned short localPort;
25   /**
26    * The "connect" event is dispatched when a client connection is accepted.
27    * The event object will be a TCPServerSocketEvent containing a TCPSocket
28    * instance, which is used for communication between client and server.
29    */
30   attribute EventHandler onconnect;
32   /**
33    * The "error" event will be dispatched when a listening server socket is
34    * unexpectedly disconnected.
35    */
36   attribute EventHandler onerror;
38   /**
39    * Close the server socket.
40    */
41   void close();