Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
ReadWriteStream.h
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/anakod/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * ReadWriteStream.h
8  *
9  ****/
10 
11 #ifndef _SMING_CORE_DATA_STREAM_READ_WRITE_STREAM_H_
12 #define _SMING_CORE_DATA_STREAM_READ_WRITE_STREAM_H_
13 
14 #include "DataSourceStream.h"
15 
24 {
25 public:
30  size_t write(uint8_t charToWrite) override
31  {
32  return write(&charToWrite, 1);
33  }
34 
43  virtual size_t write(const uint8_t* buffer, size_t size) = 0;
44 };
45 
47 #endif /* _SMING_CORE_DATA_STREAM_READ_WRITE_STREAM_H_ */
Base class for data source stream.
Definition: DataSourceStream.h:39
size_t write(uint8_t charToWrite) override
Write a single character to the stream.
Definition: ReadWriteStream.h:30
Base class for read/write stream.
Definition: ReadWriteStream.h:23