lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Non-blocking netconn_write?


From: Dany Thiffeault
Subject: [lwip-users] Non-blocking netconn_write?
Date: Wed, 13 Oct 2010 13:43:30 -0400

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.

So, what I had in mind is to change this:

tcpip_apimsg(struct api_msg *apimsg)
{
  struct tcpip_msg msg;
  
  if (mbox != SYS_MBOX_NULL) {
    msg.type = TCPIP_MSG_API;
    msg.msg.apimsg = apimsg;
    sys_mbox_post(mbox, &msg);
    sys_arch_sem_wait(apimsg->msg.conn->op_completed, 0);       <----------------------- change the 0 to another value.
    return ERR_OK;
  }
  return ERR_VAL;
}

For you lwip experts, any problems with what I suggest??

Thanks!!!
Dany

reply via email to

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