update cspot

This commit is contained in:
philippe44
2023-10-02 19:06:59 -07:00
parent eb7df4a5e9
commit 719b289659
26 changed files with 156 additions and 146 deletions

View File

@@ -1,8 +1,8 @@
#pragma once
#include <cstring>
#include <iostream>
#include <ostream>
#include <cstring>
#include "civetweb.h"
const size_t BUF_SIZE = 1024;
@@ -36,25 +36,24 @@ class MGStreamAdapter : public std::ostream {
// Custom streambuf
class mg_read_buf : public std::streambuf {
private:
struct mg_connection* conn;
char buffer[BUF_SIZE];
private:
struct mg_connection* conn;
char buffer[BUF_SIZE];
public:
mg_read_buf(struct mg_connection* _conn);
protected:
virtual int_type underflow();
public:
mg_read_buf(struct mg_connection* _conn);
protected:
virtual int_type underflow();
};
/**
* @brief Adapts istream to mg_read
*/
class MGInputStreamAdapter : public std::istream {
private:
mg_read_buf buf;
private:
mg_read_buf buf;
public:
MGInputStreamAdapter(struct mg_connection* _conn);
public:
MGInputStreamAdapter(struct mg_connection* _conn);
};