9 const std::string& boundry,
10 std::size_t max_queue_size)
11 : connection_(connection), boundry_(boundry), max_queue_size_(max_queue_size)
16 "Server",
"web_video_server").
header(
"Cache-Control",
17 "no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0").
header(
18 "Pragma",
"no-cache").
header(
"Content-type",
"multipart/x-mixed-replace;boundary="+
boundry_).
header(
25 sprintf(stamp,
"%.06lf", time.
toSec());
27 new std::vector<async_web_server_cpp::HttpHeader>());
45 std::vector<unsigned char> &data) {
55 const boost::asio::const_buffer &buffer,
73 if ((currentTime - footerTime).toSec() > 0.5) {
void sendPartHeader(const ros::Time &time, const std::string &type, size_t payload_size)
async_web_server_cpp::HttpConnectionPtr connection_
static ReplyBuilder builder(status_type status)
MultipartStream(async_web_server_cpp::HttpConnectionPtr &connection, const std::string &boundry="boundarydonotcross", std::size_t max_queue_size=1)
void sendPartAndClear(const ros::Time &time, const std::string &type, std::vector< unsigned char > &data)
void sendPart(const ros::Time &time, const std::string &type, const boost::asio::const_buffer &buffer, async_web_server_cpp::HttpConnection::ResourcePtr resource)
void write(HttpConnectionPtr connection)
void sendPartFooter(const ros::Time &time)
ReplyBuilder & header(const std::string &name, const std::string &value)
static std::vector< boost::asio::const_buffer > to_buffers(const std::vector< HttpHeader > &headers)
std::queue< PendingFooter > pending_footers_
const std::size_t max_queue_size_