Hi

When you call netconn_new(NETCONN_TCP), you should make sure the tcp init
finished. I guess your problem is tcp init unfinish.


Nicolas Dioli wrote:
> 
> Hello,
> i have a problem of mbox during initialisation of Netconn API. I had 
> seen an exemple of TCP server but i hadn't seen a TCP client:
> http://cvs.savannah.gnu.org/viewvc/contrib/apps/tcpecho/tcpecho.c?revision=1.2&root=lwip&view=markup
>  
> 
> 
> So, i wonder if i forgot something (init, bind , ...) ?
> 
> There is my code:
> 
>                      pppInit();
>                      mem_init();
>                      tcpip_init(noop, NULL);            //lwip init() + 
> create tcpip thread;
>                      pd=pppOpen(io, noop, NULL);        //create pppmain 
> thread
> 
>                      conn = netconn_new(NETCONN_TCP);
>                      IP4_ADDR(&addr, 91,168,150,182);
>                      err = netconn_connect(conn,&addr, port);
>                      if(err !=  ERR_OK){
>                          while(1){
>                              netconn_write(conn, buffer_data, 5, 0x01);
>                          }
>                      }
>                      else
>                          pppClose(pd);
> 
> 
> Nicolas
> 
> Thanks
> 
> 
> _______________________________________________
> lwip-users mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-close-tcp_thread-tp28065857p28442368.html
Sent from the lwip-users mailing list archive at Nabble.com.



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to