blob: 16c5c92b51c9c12ccd1e02816e5fc77d9df191b1 [file] [log] [blame]
// Copyright 2018 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://w3c.github.io/webrtc-quic/#dom-rtcquictransportstate
enum RTCQuicTransportState {
"new",
"connecting",
"connected",
"closed",
"failed",
};
// https://w3c.github.io/webrtc-quic/#quic-transport*
[
Constructor(RTCIceTransport transport),
ConstructorCallWith=ExecutionContext,
RaisesException=Constructor,
Exposed=Window,
RuntimeEnabled=RTCQuicTransport
] interface RTCQuicTransport : EventTarget {
readonly attribute RTCIceTransport transport;
readonly attribute RTCQuicTransportState state;
ArrayBuffer getKey();
[RaisesException] void connect();
[RaisesException] void listen(BufferSource remote_key);
void stop();
[RaisesException] RTCQuicStream createStream();
attribute EventHandler onstatechange;
attribute EventHandler onerror;
attribute EventHandler onquicstream;
};