FastLED 3.9.15
Loading...
Searching...
No Matches
fl::net::http::StreamHandle Class Reference

Detailed Description

Handle for ASYNC_STREAM calls Provides onData() for intermediate updates, plus then()/catch_() for final result.

Definition at line 23 of file stream_transport.h.

#include <stream_transport.h>

+ Collaboration diagram for fl::net::http::StreamHandle:

Public Member Functions

 StreamHandle () FL_NOEXCEPT=default
 
StreamHandlecatch_ (fl::function< void(const fl::task::Error &)> cb)
 Register callback for errors.
 
StreamHandleonData (fl::function< void(const fl::json &)> cb)
 Register callback for intermediate stream data.
 
fl::task::Promise< fl::json > & promise ()
 Access the underlying promise.
 
StreamHandlethen (fl::function< void(const fl::json &)> cb)
 Register callback for final result.
 
bool valid () const
 Check if handle is valid.
 

Private Member Functions

 StreamHandle (fl::task::Promise< fl::json > p, fl::shared_ptr< fl::function< void(const fl::json &)> > updateCb)
 

Private Attributes

fl::task::Promise< fl::jsonmPromise
 
fl::shared_ptr< fl::function< void(const fl::json &)> > mUpdateCallback
 

Friends

class HttpStreamTransport
 

The documentation for this class was generated from the following files: