tor-browser

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

nsTransportUtils.h (1132B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #ifndef nsTransportUtils_h__
      6 #define nsTransportUtils_h__
      7 
      8 #include "nsITransport.h"
      9 
     10 /**
     11 * This function returns a proxy object for a transport event sink instance.
     12 * The transport event sink will be called on the thread indicated by the
     13 * given event target.  Like events are automatically coalesced.  This means
     14 * that for example if the status value is the same from event to event, and
     15 * the previous event has not yet been delivered, then only one event will
     16 * be delivered.  The progress reported will be that from the second event.
     17 
     18 * Coalescing events can help prevent a backlog of unprocessed transport
     19 * events in the case that the target thread is overworked.
     20 */
     21 nsresult net_NewTransportEventSinkProxy(nsITransportEventSink** aResult,
     22                                        nsITransportEventSink* aSink,
     23                                        nsIEventTarget* aTarget);
     24 
     25 #endif  // nsTransportUtils_h__