1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

write(), print(), and println() now return number of bytes written.

The type is long, and negative values indicate errors.  Needs more testing.
http://code.google.com/p/arduino/issues/detail?id=551
This commit is contained in:
David A. Mellis
2011-08-23 19:12:03 -04:00
parent b788ad593f
commit 8059abe581
24 changed files with 290 additions and 174 deletions

View File

@ -12,9 +12,9 @@ public:
uint8_t status();
int connect(IPAddress ip, uint16_t port);
int connect(const char *host, uint16_t port);
virtual void write(uint8_t);
virtual void write(const char *str);
virtual void write(const uint8_t *buf, size_t size);
virtual long write(uint8_t);
virtual long write(const char *str);
virtual long write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
virtual int read(uint8_t *buf, size_t size);