As I tried to mention before, only the serial receive routine has currently the knowledge of when a complete serial message is recevied and it than uses tcp_write and tcp_output to send out the message.
Do you mean that I should check if the connection is open in the interrupt routine? If open send the message. If not open, open the connection, return and let the connect callback send the message? Can the connection be closed between the check and the transmit inside the interrupt routine? Is this mix of different contexts really safe? When I tried to open the connection inside the serial interrupt I did not see any SYN packages. Do I have to do an init one more time also? When I let the error callback reconnect everything looks normal in Wireshark. I am just a little bit worried about the big amount of disconnect/connect messages if we use many devices. Simon Goldschmidt wrote: > > Cretainly not! The raw API is an event-based API: you call tcp_connect() > and return instead of watiting. Either your connected-callback (on > successful connect) or your err-callback will be called later. > > However, you should at least see a SYN packet going out when calling > tcp_connect(). > > But as I mentioned before, the Stellaris port for lwIP I once had a look > at was using lwIP in a strange way, so this *might* be a race condition of > using lwIP from different interrupt-levels (or interrupt and main loop). > > Simon > > _______________________________________________ > lwip-users mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/lwip-users > > -- View this message in context: http://old.nabble.com/Reopening-LWIP-for-new-HTTP-message-tp34265577p34271652.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
