1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +01:00

Changed the return type on write() from void to size_t to match Print.h

This commit is contained in:
Tom Igoe 2011-09-13 17:36:01 -04:00
parent 20bea5fcc0
commit 7c484e3cb3
2 changed files with 4 additions and 4 deletions

4
WiFi/WiFiServer.cpp Executable file → Normal file
View File

@ -46,12 +46,12 @@ WiFiClient WiFiServer::available(byte* status)
return WiFiClient(255);
}
void WiFiServer::write(uint8_t b)
size_t WiFiServer::write(uint8_t b)
{
write(&b, 1);
}
void WiFiServer::write(const uint8_t *buffer, size_t size)
size_t WiFiServer::write(const uint8_t *buffer, size_t size)
{
for (int sock = 0; sock < MAX_SOCK_NUM; sock++)
{

4
WiFi/WiFiServer.h Executable file → Normal file
View File

@ -17,8 +17,8 @@ public:
WiFiServer(uint16_t);
WiFiClient available(uint8_t* status = NULL);
void begin();
virtual void write(uint8_t);
virtual void write(const uint8_t *buf, size_t size);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
};
#endif