NetBurner 3.5.6
PDF Version
web_buffers.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5#ifndef _WEB_BUFFERS_H
6#define _WEB_BUFFERS_H
7#include <nbstring.h>
8
9
20{
21 public:
22 // A write of ZERO bytes indicates end of data stream
23 virtual int WriteData(const unsigned char *pCopyFrom, int num_bytes) = 0;
24 virtual int ReadFrom(int fd) = 0;
25 virtual void ProcessHeader(const char * hdr) {};
26};
27
32{
33 unsigned char *cp_to;
34 int space_left;
35 int used;
36 public:
37
38 virtual int WriteData(const unsigned char *pCopyFrom, int num_bytes);
39 virtual int ReadFrom(int fd);
40
41 SimpleBufferObject(unsigned char *p, int len)
42 {
43 cp_to = p;
44 space_left = len;
45 used = 0;
46 };
47 int AmountUsed() { return used; };
48};
49
54{
55 NBString & TheString;
56 public:
57
58 virtual int WriteData(const unsigned char *pCopyFrom, int num_bytes);
59 virtual int ReadFrom(int fd);
60
61 StringBufferObject(NBString & s) :TheString(s){};
62};
63
66#endif
Lightweight alternative to C++ CString class.
Definition nbstring.h:118
Class for web client response buffers.
Definition web_buffers.h:32
Class for NBString-based web client response buffers.
Definition web_buffers.h:54
Base class for web client response buffers.
Definition web_buffers.h:20
NetBurner String Class.