]> Joshua Wise's Git repositories - netwatch.git/commitdiff
more poking
authorJacob Potter <jdpotter@andrew.cmu.edu>
Sun, 14 Dec 2008 01:08:34 +0000 (20:08 -0500)
committerJacob Potter <jdpotter@andrew.cmu.edu>
Sun, 14 Dec 2008 01:08:34 +0000 (20:08 -0500)
lwip/src/include/lwipopts.h
net/rfb.c

index ec5a614460d04a4f7c01d701bee4f3a82220adb4..9c92b59e5c0d937fb370ef69b27fa85838fa18ab 100644 (file)
@@ -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 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
 
 #endif
index 5fe1a1100cf36228f248cbadbc3a22ce3329264a..70d2c05325742c47ec32a5d683c89a75dea52a10 100644 (file)
--- a/net/rfb.c
+++ b/net/rfb.c
@@ -6,6 +6,7 @@
 #include "../aseg-paging/keyboard.h"
 
 #include "lwip/tcp.h"
 #include "../aseg-paging/keyboard.h"
 
 #include "lwip/tcp.h"
+#include "lwip/stats.h"
 
 #include "rfb.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;
 }
 
        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);
 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_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_err(pcb, rfb_err);
-       tcp_poll(pcb, rfb_poll, 2);
 */
        tcp_write(pcb, "RFB 003.008\n", 12, 0);
        tcp_output(pcb);
 */
        tcp_write(pcb, "RFB 003.008\n", 12, 0);
        tcp_output(pcb);
This page took 0.028349 seconds and 4 git commands to generate.