ovidiucp / TinyWebServer

Small web server for Arduino, fits in 10KB ROM, less than 512 bytes RAM
http://www.webweavertech.com/ovidiu/weblog/archives/000484.html
GNU Lesser General Public License v2.1
245 stars 65 forks source link

An hint in order to make the server operating on ports other than 80 #14

Closed FulvioSpelta closed 11 years ago

FulvioSpelta commented 12 years ago

Hi, I like very much your library and I kindly submit to you a little hint in order to make the server operating on ports other than 80 wich is sometime useful in complex environment. In my case i run arduino on port 9090 and i access it from internet using a reverse proxy.

The little modifications (backwords compatibile):

tinywebserver.h line 71:


  TinyWebServer(PathHandler handlers[], const char** headers, const int Port=80);

tinywebserver.cpp line 71 and following:


TinyWebServer::TinyWebServer(PathHandler handlers[],
                 const char** headers,
                 const int Port)
  : handlers_(handlers),
    server_(EthernetServer(Port)),
    path_(NULL),
    request_type_(UNKNOWN_REQUEST),
    client_(EthernetClient(255)) {

I know is it obviously banal but could be useful in further releases. Thanks for your work. f

ovidiucp commented 11 years ago

Thanks, added!