Go Down

Topic: Ethernet library reference change #2 (Read 2049 times) previous topic - next topic


Jul 06, 2013, 02:27 pm Last Edit: Jul 06, 2013, 02:41 pm by SurferTim Reason: 1
As long as you are in the ethernet library reference, the following pages need an addition.

The pages are missing one of the most useful functions if you plan on sending any NULL (zero) bytes.

dataString: the array to write (byte or char array pointer)
count: the number of bytes of the dataString array to write (int)

edit: Corrected dataString parameter to "byte or char array pointer".


Jul 10, 2013, 01:00 pm Last Edit: Jul 10, 2013, 01:46 pm by SurferTim Reason: 1
Bump. Did you have a nice nap?

edit: Here is the library code (declarations) from EthernetClient.h
Code: [Select]
 virtual size_t write(uint8_t);
 virtual size_t write(const uint8_t *buf, size_t size);

Here is the code from EthernetClient.cpp
Code: [Select]
size_t EthernetClient::write(uint8_t b) {
 return write(&b, 1);

size_t EthernetClient::write(const uint8_t *buf, size_t size) {
 if (_sock == MAX_SOCK_NUM) {
   return 0;
 if (!send(_sock, buf, size)) {
   return 0;
 return size;

Federico Vanzati

Hi SurferTim,

I've edited the Client and Server write() pages, thanks for the suggestion and for noticing.
I preferred to keep the explanation close to the one given to Serial write() documentation.
Hope you like it.


That looks good to me!  :)

One down, two to go!

Federico Vanzati

One.  :)
DNS fixed. Only the UDP.stop() to go

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131