2012-10-03 16:51:47 -07:00
|
|
|
#include "domstubs.idl"
|
|
|
|
|
|
|
|
#include "nsIDOMEventTarget.idl"
|
|
|
|
|
|
|
|
interface nsIVariant;
|
|
|
|
|
2013-03-31 18:09:25 -07:00
|
|
|
[scriptable, builtinclass, uuid(1aed816d-1156-414e-8fe2-f01daa6021f0)]
|
2012-10-03 16:51:47 -07:00
|
|
|
interface nsIDOMDataChannel : nsIDOMEventTarget
|
|
|
|
{
|
|
|
|
readonly attribute DOMString label;
|
2013-03-31 18:09:25 -07:00
|
|
|
readonly attribute DOMString protocol;
|
2012-10-03 16:51:47 -07:00
|
|
|
readonly attribute boolean reliable;
|
|
|
|
readonly attribute boolean ordered;
|
|
|
|
|
|
|
|
readonly attribute DOMString readyState;
|
|
|
|
readonly attribute unsigned long bufferedAmount;
|
|
|
|
|
2013-03-31 18:09:25 -07:00
|
|
|
readonly attribute unsigned short stream;
|
|
|
|
|
2012-10-03 16:51:47 -07:00
|
|
|
[implicit_jscontext] attribute jsval onopen;
|
|
|
|
[implicit_jscontext] attribute jsval onerror;
|
|
|
|
[implicit_jscontext] attribute jsval onclose;
|
|
|
|
[implicit_jscontext] attribute jsval onmessage;
|
|
|
|
|
|
|
|
attribute DOMString binaryType;
|
|
|
|
|
|
|
|
void close();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transmits data to other end of the connection.
|
|
|
|
* @param data The data to be transmitted. Arraybuffers and Blobs are sent as
|
|
|
|
* binary data. Strings are sent as UTF-8 text data. Other types are
|
|
|
|
* converted to a String and sent as a String.
|
|
|
|
* @return if the connection is still established and the data was queued or
|
|
|
|
* sent successfully.
|
|
|
|
*/
|
2012-11-15 11:54:34 -08:00
|
|
|
void send(in nsIVariant data);
|
2012-10-03 16:51:47 -07:00
|
|
|
};
|