lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwip raw TCP client.


From: matbli
Subject: [lwip-users] lwip raw TCP client.
Date: Mon, 4 Jun 2012 00:07:56 -0700 (PDT)


Hi,

I'm trying t write a TCP client using lwip. I have started with
functionality to 
open and closing a socket using raw API.

Opening a socket using:

rTcpConnect=tcp_connect(tcp_pcb, &ip, 2020, mainTcpConnectAccept);

Works fine, as it seems. My test server says new client IP=xxx.xxx.xxx.xxx.

Closing the socket using:

tcp_close(tcp_pcb);

Also works fine, as it seems. My test server says socket closed by client.

But when I try to connect again, I get:

tcp_connect: can only connected from state CLOSED


The only place I can find where pcb->state = CLOSED; is in:

tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)

But I'm not shure how to us it or if this is the way to do it. If I shall us
it how do I know
what list the PCB is on.

Any help appreciated.

Best regards,
Mats
 






-- 
View this message in context: 
http://old.nabble.com/lwip-raw-TCP-client.-tp33956119p33956119.html
Sent from the lwip-users mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]