|
From: | address@hidden |
Subject: | Re: [lwip-users] tcp_poll(), event handlers and possible misinformation |
Date: | Wed, 01 Jul 2009 22:23:46 +0200 |
User-agent: | Thunderbird 2.0.0.22 (Macintosh/20090605) |
Lou Cypher wrote:
The above line is wrong: size should print p->tot_len, not p->len! Multiple packets may get combined to a linked list of pbufs and passed to your callback as one. Other than that, I don't see anything wrong.A source code is worth a thousand words... My recv looks like this: ----------------------------------------------------------- err_t http_recv( void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err ) { ... if ( err == ERR_OK && p != NULL ) { PRINTDEBUG( "recv: remote %d, size %d\r\n", pcb->remote_port, p->len );
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |