Source code
Revision control
Copy as Markdown
Other Tools
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
*
* The origin of this IDL file is
*/
dictionary UDPOptions {
DOMString localAddress;
unsigned short localPort;
DOMString remoteAddress;
unsigned short remotePort;
boolean addressReuse = true;
boolean loopback = false;
};
[Pref="dom.udpsocket.enabled",
ChromeOnly,
Exposed=Window]
interface UDPSocket : EventTarget {
[Throws]
constructor(optional UDPOptions options = {});
readonly attribute DOMString? localAddress;
readonly attribute unsigned short? localPort;
readonly attribute DOMString? remoteAddress;
readonly attribute unsigned short? remotePort;
readonly attribute boolean addressReuse;
readonly attribute boolean loopback;
readonly attribute SocketReadyState readyState;
readonly attribute Promise<undefined> opened;
readonly attribute Promise<undefined> closed;
Promise<undefined> close ();
[Throws] undefined joinMulticastGroup (DOMString multicastGroupAddress);
[Throws] undefined leaveMulticastGroup (DOMString multicastGroupAddress);
[Throws] boolean send ((DOMString or Blob or ArrayBuffer or ArrayBufferView) data, optional DOMString? remoteAddress, optional unsigned short? remotePort); //Bug 1056444: use send method before Stream API is ready
};