[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Netconn API_ client TCP
From: |
Nicolas Dioli |
Subject: |
[lwip-users] Netconn API_ client TCP |
Date: |
Wed, 28 Apr 2010 10:34:40 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 |
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