Dear Sir:
I find a very strange question.
I use Luminary LM3S8962,and I use the Lwip1.2.0 ported by Luminary.
I define The max tcp  connection is 4
 the pbuf size is 256  and  the pbuf number is 32
But I find a very strange question for each connection I can receive 9
package of less the 512 bytes more than 256  bytes and 18 package of l
less than 256 bytes ,then no receive at all . If the 4 connection is all
used , It can receive nothing from the Lwip Tcp.
Can someone give me answers ? and why ? and how to solve this question .
 
The source show like this 
 
static err_t  my_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p,
err_t err )
{
  char *rq;
  INT16U i;
  if(p != NULL)
  {
       rq = p->payload;
      ....
 
      pbuf_free(p);
       com1_led_on();
  }
 
  return ERR_OK;
}
static err_t  my_accept(void *arg, struct tcp_pcb *pcb, err_t err)
{
 
tcp_recv(pcb, my_recv);
 
 return ERR_OK;
}
void monitor_init( void)
{
  struct tcp_pcb *pcb;
 
  monitor.ornt_state=0;
  pcb = tcp_new();
  tcp_bind(pcb, IP_ADDR_ANY, 23);
  pcb = tcp_listen(pcb);
  tcp_accept(pcb,my_accept);
 
}        
 
 
 
Steelen
 
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to