nsTransportUtils.h 1.1 KB

123456789101112131415161718192021222324252627
  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. #ifndef nsTransportUtils_h__
  5. #define nsTransportUtils_h__
  6. #include "nsITransport.h"
  7. /**
  8. * This function returns a proxy object for a transport event sink instance.
  9. * The transport event sink will be called on the thread indicated by the
  10. * given event target. Like events are automatically coalesced. This means
  11. * that for example if the status value is the same from event to event, and
  12. * the previous event has not yet been delivered, then only one event will
  13. * be delivered. The progress reported will be that from the second event.
  14. * Coalescing events can help prevent a backlog of unprocessed transport
  15. * events in the case that the target thread is overworked.
  16. */
  17. nsresult
  18. net_NewTransportEventSinkProxy(nsITransportEventSink **aResult,
  19. nsITransportEventSink *aSink,
  20. nsIEventTarget *aTarget);
  21. #endif // nsTransportUtils_h__