Concerns lwIP v1.3.2.
I have a TCP client in an embedded app and after I send the data I have
to wait for an answer.
....
netconn_write ( conn, data, size, NETCONN_NOCOPY );
TNetBuf xBuf = netconn_recv ( conn );
if ( xBuf != NULL )
{
netbuf_copy ( xBuf, mRcvBuf, csBufSize );
netbuf_delete ( xBuf );
}
This works so far. But what if the server does not answer? The
'netconn_recv' does not seem to have a time-out and the application
hangs at this point. I see there is a compiler switch
'LWIP_SO_RCVTIMEO', which is disabled by default. Is this the means to
accomplish a time-out - and what would be the time - or are there other
schemes?
There is a problem, though. Besides the TCP client there is also a TCP
server that actually should block at 'netconn_recv'. Hence I have
contradicting requirements. How to overcome this?
Thanks in advance.
Walter
_______________________________________________
Walter Saegesser
Dipl.-Ing. (FH)
R&D - Software
Business Unit IMS - Line of Business Solar Inverter
_______________________________________________
Delta Renewable Energy Systems (Switzerland) AG
Burgerfeldstrasse 19, CH-8730 Uznach SG, Switzerland
TEL: +41 (0)55 246-4140
FAX: +41 (0)55 246-4116
[email protected] <mailto:[email protected]>
www.deltaenergysystems.com <http://www.deltaenergysystems.com/>
_______________________________________________
********************************************************************************************************************************
This email message, including any attachments, is for the sole use of the
intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
[Delta Energy Systems]
********************************************************************************************************************************
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users