1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Changing from long to ssize_t (int) for write(), print(), println() return.

This commit is contained in:
David A. Mellis
2011-08-26 14:20:41 -04:00
parent 3f0b7f21c2
commit 929597375b
23 changed files with 123 additions and 121 deletions

View File

@ -70,15 +70,15 @@ int Client::connect(IPAddress ip, uint16_t port) {
return 1;
}
long Client::write(uint8_t b) {
ssize_t Client::write(uint8_t b) {
return write(&b, 1);
}
long Client::write(const char *str) {
ssize_t Client::write(const char *str) {
return write((const uint8_t *) str, strlen(str));
}
long Client::write(const uint8_t *buf, size_t size) {
ssize_t Client::write(const uint8_t *buf, size_t size) {
if (_sock == MAX_SOCK_NUM) return -1;
if (!send(_sock, buf, size)) return -2;
return size;