lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Non-blocking netconn_write?


From: Kieran Mansley
Subject: Re: [lwip-users] Non-blocking netconn_write?
Date: Thu, 14 Oct 2010 10:09:32 +0100

On Wed, 2010-10-13 at 13:43 -0400, Dany Thiffeault wrote:
> Hi,
> 
> 
> I just found out that "netconn_write" is blocking indefinitely, or
> until the operation completes. This is a problem for me. I'm currently
> testing my system to react correctly when an Ethernet disconnection
> occurs. There are safety features I must implement and one of them is
> to stop everything as soon as I detect a disconnection or a
> communication problem over Ethernet.

The problem you'll have with this is that the return code and error
setting for the netconn_write() (and similarly for sockets API built on
top of netconn) will not be correct.  The code has to wait for the write
to be successful to know that it can return success.  If there was an
error it must report it.


Does do a non-blocking write call instead help you?

Kieran




reply via email to

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