Skip to content

Commit

Permalink
Make static buffer the default, add comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dak664 committed Mar 6, 2012
1 parent 5288ac1 commit 7110075
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions examples/ipv6/rpl-border-router/border-router.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,26 @@ AUTOSTART_PROCESSES(&border_router_process);
#include "webserver-nogui.h"
AUTOSTART_PROCESSES(&border_router_process,&webserver_nogui_process);
#else
/* Use simple webserver with only one page */
/* Use simple webserver with only one page for minimum footprint.
* Multiple connections can result in interleaved tcp segments since
* a single static buffer is used for all segments.
*/
#include "httpd-simple.h"

/* The internal webserver can provide additional information if
* enough program flash is available.
*/
#define WEBSERVER_CONF_LOADTIME 0
#define WEBSERVER_CONF_FILESTATS 0
#define WEBSERVER_CONF_NEIGHBOR_STATUS 0
/* Adding links requires a larger RAM buffer. To avoid static allocation
* the stack can be used for formatting; however tcp retransmissions
* and multiple connections can result in garbled segments.
* TODO:use PSOCk_GENERATOR_SEND and tcp state storage to fix this.
*/
#define WEBSERVER_CONF_ROUTE_LINKS 0
#if WEBSERVER_CONF_ROUTE_LINKS
#define BUF_USES_STACK 1
#endif

PROCESS(webserver_nogui_process, "Web server");
PROCESS_THREAD(webserver_nogui_process, ev, data)
Expand Down

0 comments on commit 7110075

Please sign in to comment.