Ethernet library reference change #2

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.
client.write(dataString,count);
server.write(dataString,count);

Parameters
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".

Bump. Did you have a nice nap?

edit: Here is the library code (declarations) from EthernetClient.h

  virtual size_t write(uint8_t);
  virtual size_t write(const uint8_t *buf, size_t size);

Here is the code from EthernetClient.cpp

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) {
    setWriteError();
    return 0;
  }
  if (!send(_sock, buf, size)) {
    setWriteError();
    return 0;
  }
  return size;
}

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! :slight_smile:

One down, two to go!

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