> char response[] = "HTTP/1.1 200 OK\nContent-Type: text/html\n\nlol";
isnt it better to write that as:
const char* response = "HTTP/1.1 200 OK\nContent-Type: text/html\n\nlol"; ?
Having the string in a writable buffer when you have no intention of modifying the string seems like not a very good idea.
Any decent compiler will evaluate "strlen(response)" at compile time and hence there will be no run time penalty here.