Chat freely about anything...

User avatar
By martinayotte
#48077 If it is the read() that choke, maybe you can do chunk read using this code :
Code: Select all    int size;
    while ((size = client.available()) > 0) {
      uint8_t* msg = (uint8_t*)malloc(size);
      size = client.read(msg, size);
      Serial.write(msg, size);
      free(msg);
    }
User avatar
By martinayotte
#48108 The above code simply print the whole response from the client, what ever the size of it, either few bytes or several kilobytes, by reading it chunk by chunk while it been received. The malloc() allocates temporary memory buffer to the size of the chunk and free it as soon it has been outputted to the Serial before processing next chunk.