From: Jacob Potter Date: Sun, 14 Dec 2008 01:08:34 +0000 (-0500) Subject: more poking X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/b59a6e50dee7916f2e486a08f420e903e97132fa?ds=sidebyside;hp=-c more poking --- b59a6e50dee7916f2e486a08f420e903e97132fa diff --git a/lwip/src/include/lwipopts.h b/lwip/src/include/lwipopts.h index ec5a614..9c92b59 100644 --- a/lwip/src/include/lwipopts.h +++ b/lwip/src/include/lwipopts.h @@ -23,7 +23,10 @@ extern void _memcpy(void *dest, const void *src, int bytes); #define TCP_SND_BUF (16 * TCP_MSS) #define TCP_SND_QUEUELEN 16 -#define MEMP_NUM_PBUF 128 -#define PBUF_POOL_SIZE 96 +#define MEMP_NUM_PBUF 256 +#define PBUF_POOL_SIZE 128 +#define PBUF_POOL_BUFSIZE 512 + +#define LWIP_STATS 1 #endif diff --git a/net/rfb.c b/net/rfb.c index 5fe1a11..70d2c05 100644 --- a/net/rfb.c +++ b/net/rfb.c @@ -6,6 +6,7 @@ #include "../aseg-paging/keyboard.h" #include "lwip/tcp.h" +#include "lwip/stats.h" #include "rfb.h" @@ -322,6 +323,13 @@ static err_t rfb_sent(void *arg, struct tcp_pcb *pcb, uint16_t len) { return ERR_OK; } +static err_t rfb_poll(void *arg, struct tcp_pcb *pcb) { + struct rfb_state *state = arg; + send_fsm(pcb, state); + stats_display(); + return ERR_OK; +} + static void close_conn(struct tcp_pcb *pcb, struct rfb_state *state) { tcp_arg(pcb, NULL); tcp_sent(pcb, NULL); @@ -591,9 +599,9 @@ static err_t rfb_accept(void *arg, struct tcp_pcb *pcb, err_t err) { tcp_arg(pcb, state); tcp_recv(pcb, rfb_recv); tcp_sent(pcb, rfb_sent); + tcp_poll(pcb, rfb_poll, 1); /* tcp_err(pcb, rfb_err); - tcp_poll(pcb, rfb_poll, 2); */ tcp_write(pcb, "RFB 003.008\n", 12, 0); tcp_output(pcb);