/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// When called, perform steps in "Initialization WebTransport over HTTP". void asyncConnect(in nsIURI aURI,
in boolean aDedicated,
in Array<nsIWebTransportHash> aServerCertHashes,
in nsIPrincipal aLoadingPrincipal,
in unsignedlong aSecurityFlags,
in WebTransportSessionEventListener aListener,
[optional] in nsIWebTransport_HTTPVersion aVersion);
[noscript] void asyncConnectWithClient(in nsIURI aURI,
in boolean aDedicated,
in Array<nsIWebTransportHash> aServerCertHashes,
in nsIPrincipal aLoadingPrincipal,
in uint64_t aBrowsingContextID,
in unsignedlong aSecurityFlags,
in WebTransportSessionEventListener aListener,
in const_MaybeClientInfoRef aClientInfo,
in nsIWebTransport_HTTPVersion aVersion);
// Asynchronously get stats. void getStats();
// Close the session. void closeSession(in uint32_t aErrorCode,
in ACString aReason);
// Create and open a new WebTransport stream. void createOutgoingBidirectionalStream(in nsIWebTransportStreamCallback aListener); void createOutgoingUnidirectionalStream(in nsIWebTransportStreamCallback aListener);
void sendDatagram(in Array<uint8_t> aData, in uint64_t aTrackingId);
void getMaxDatagramSize();
uint64_t getHttpChannelID();
// This can be only called after onSessionReady(). // After this point, we can retarget the underlying WebTransportSessionProxy // object off main thread.
[noscript] void retargetTo(in nsIEventTarget aTarget);
};
// Events related to a WebTransport session.
[scriptable, uuid(0e3cb269-f318-43c8-959e-897f57894b71)]
interface WebTransportSessionEventListener : nsISupports { // This is used to let the consumer of nsIWebTransport know that the // underlying WebTransportSession object is ready to use. void onSessionReady(in uint64_t aSessionId); void onSessionClosed(in boolean aCleanly,
in uint32_t aErrorCode,
in ACString aReason);
// When a new stream has been received. void onIncomingBidirectionalStreamAvailable(in nsIWebTransportBidirectionalStream aStream); void onIncomingUnidirectionalStreamAvailable(in nsIWebTransportReceiveStream aStream);
void onStopSending(in uint64_t aStreamId, in nsresult aError); void onResetReceived(in uint64_t aStreamId, in nsresult aError);
// When a new datagram has been received. void onDatagramReceived(in Array<uint8_t> aData);
[uuid(8fb30aa9-5163-4eb3-81f3-371e1ccb5b0e)]
interface WebTransportSessionEventListenerInternal : nsISupports { // This is used internally to pass the reference of WebTransportSession // object to WebTransportSessionProxy. void onSessionReadyInternal(in WebTransportSessionPtr aSession);
// This is used internally to pass the reference of WebTransportStream // object to WebTransportSessionProxy. void onIncomingStreamAvailableInternal(in WebTransportStreamPtr aStream);
// This is used internally to pass the datagram to WebTransportSessionProxy. void onDatagramReceivedInternal(in Datagram aData);
};
// This interface is used as a callback when creating an outgoing // unidirectional or bidirectional stream.
[scriptable, uuid(c6eeff1d-599b-40a8-9157-c7a40c3d51a2)]
interface nsIWebTransportStreamCallback : nsISupports { void onBidirectionalStreamReady(in nsIWebTransportBidirectionalStream aStream); void onUnidirectionalStreamReady(in nsIWebTransportSendStream aStream); void onError(in uint8_t aError);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.