You need to read about two things. Perhaps three.
One is TCP, and connection oriented protocols. Before sending you need
to establish a connection, you can't send to iwishsomeoneisthere like
UDP, which is a connection-less protocol. TCP is just like a phone call
before voice mail was invented. No answer = no message.
You are not waiting for the connection to take place.
The second thing is the docs, or the wiki, where you'll find examples on
how to do things properly. You could also see other examples looking at
the apps and/or the contrib tree.
http://lwip.wikia.com/wiki/Raw/TCP
You'll see that you need a state machine or a similar functionality.
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users