Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Development / Re: Revised Ethernet Library Client code on: November 23, 2009, 08:46:56 am
Thanks for the revised Client.cpp.

I had to add the two overloaded methods below to get my sketch to compile in Arduino-0017

void Client::write(const char *str) {
  if (_sock != 255)
    send(_sock, (const uint8_t *)str, strlen(str));
}

void Client::write(const uint8_t *buf, size_t size) {
  if (_sock != 255)
    send(_sock, buf, size);
}


They needed to be added because server.cpp called the following:

client.write(buffer, size)

I am not a very experienced programmer so this all may be proven wrong.  Is this a good solution?

Pages: [1]