tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PWebSocket.ipdl (2367B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
      3 
      4 /* This Source Code Form is subject to the terms of the Mozilla Public
      5  * License, v. 2.0. If a copy of the MPL was not distributed with this
      6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      7 
      8 include protocol PNecko;
      9 include protocol PBrowser;
     10 include protocol PTransportProvider;
     11 include IPCStream;
     12 include NeckoChannelParams;
     13 
     14 include "mozilla/net/WebSocketChannelParent.h";
     15 include "mozilla/net/WebSocketChannelChild.h";
     16 
     17 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
     18 [RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
     19 
     20 namespace mozilla {
     21 namespace net {
     22 
     23 [ManualDealloc, ChildImpl="WebSocketChannelChild", ParentImpl="WebSocketChannelParent"]
     24 async protocol PWebSocket
     25 {
     26   manager PNecko;
     27 
     28 parent:
     29   // Forwarded methods corresponding to methods on nsIWebSocketChannel
     30   async AsyncOpen(nullable nsIURI aURI,
     31                   nsCString aOrigin,
     32                   OriginAttributes aOriginAttributes,
     33                   uint64_t aInnerWindowID,
     34                   nsCString aProtocol,
     35                   bool aSecure,
     36                   // ping values only meaningful if client set them
     37                   uint32_t aPingInterval,
     38                   bool aClientSetPingInterval,
     39                   uint32_t aPingTimeout,
     40                   bool aClientSetPingTimeout,
     41                   LoadInfoArgs aLoadInfoArgs,
     42                   PTransportProvider? aProvider,
     43                   nsCString aNegotiatedExtensions);
     44   async Close(uint16_t code, nsCString reason);
     45   async SendMsg(nsCString aMsg);
     46   async SendBinaryMsg(nsCString aMsg);
     47   async SendBinaryStream(IPCStream aStream, uint32_t aLength);
     48 
     49   async DeleteSelf();
     50 
     51 child:
     52   // Forwarded notifications corresponding to the nsIWebSocketListener interface
     53   async OnStart(nsCString aProtocol, nsCString aExtensions,
     54                 nsString aEffectiveURL, bool aEncrypted,
     55                 uint64_t aHttpChannelId);
     56   async OnStop(nsresult aStatusCode);
     57   async OnMessageAvailable(nsCString aMsg, bool aMoreData);
     58   async OnBinaryMessageAvailable(nsCString aMsg, bool aMoreData);
     59   async OnAcknowledge(uint32_t aSize);
     60   async OnServerClose(uint16_t code, nsCString aReason);
     61 
     62   async __delete__();
     63 
     64 };
     65 
     66 } //namespace net
     67 } //namespace mozilla