netwerk/base/src/nsTransportUtils.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     5 #ifndef nsTransportUtils_h__
     6 #define nsTransportUtils_h__
     8 #include "nsITransport.h"
    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  * If aCoalesceAllEvents is true, then any undelivered event will be replaced
    18  * with the next event if it arrives early enough.  This option should be used
    19  * cautiously since it can cause states to be effectively skipped.  Coalescing
    20  * events can help prevent a backlog of unprocessed transport events in the
    21  * case that the target thread is overworked.
    22  */
    23 NS_HIDDEN_(nsresult)
    24 net_NewTransportEventSinkProxy(nsITransportEventSink **aResult,
    25                                nsITransportEventSink *aSink,
    26                                nsIEventTarget *aTarget,
    27                                bool aCoalesceAllEvents = false);
    29 #endif // nsTransportUtils_h__

mercurial