You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
650 B
30 lines
650 B
/*
|
|
|
|
Utility class to process data in a byte-wise manner without
|
|
requiring large memory buffers on the microcontroller.
|
|
|
|
*/
|
|
|
|
#ifndef _STREAM_CONNECTION_H_
|
|
#define _STREAM_CONNECTION_H_
|
|
|
|
#include "libw5100.h"
|
|
|
|
class StreamConnection {
|
|
|
|
public:
|
|
StreamConnection(NetworkConnection& connection);
|
|
int peekByte();
|
|
int readByte();
|
|
int skipSegment(const char * separators); // TODO: Return if separators found or not?
|
|
int readSegmentByte(const char * separators);
|
|
int debug;
|
|
int gobbleMatch(const char * separators, const char * target);
|
|
|
|
private:
|
|
NetworkConnection& _connection;
|
|
int _byteSeen;
|
|
};
|
|
|
|
#endif
|