1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-11 00:52:21 +01:00
David A. Mellis b73cf39d94 Moving write errors out of return value into separate API methods.
write(), print(), println() now return size_t (and don't use negative values to signal errors).
Print adds writeError() for checking for write errors, clearWriteError() to reset the flag to false, and a protected setWriteError() for signalling errors.

http://code.google.com/p/arduino/issues/detail?id=598
2011-08-26 16:08:14 -04:00

23 lines
353 B
C++

#ifndef server_h
#define server_h
#include "Print.h"
class Client;
class Server :
public Print {
private:
uint16_t _port;
void accept();
public:
Server(uint16_t);
Client available();
void begin();
virtual size_t write(uint8_t);
virtual size_t write(const char *str);
virtual size_t write(const uint8_t *buf, size_t size);
};
#endif