CoreUtils/StreamReader.h
2025-12-17 17:07:14 -08:00

34 lines
622 B
C++

#ifndef __StreamReader_h__
#define __StreamReader_h__
#include "MString.h"
#include "Parser.h"
#include <fstream>
#include <vector>
namespace coreutils {
///
/// Use the StreamReader to read data from a socket and buffer it for use by
/// various stream parsers such as IMFMessage. The reader maintains data
/// consistency regardless of the packet delivery for the stream.
///
class StreamReader {
public:
StreamReader(int fd, Parser *parser);
virtual ~StreamReader();
int read();
private:
int fd;
vector<MString> buffer;
};
}
#endif