lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] netconn - using in different tasks


From: ncoage
Subject: Re: [lwip-users] netconn - using in different tasks
Date: Wed, 13 May 2009 10:52:55 +0200

> The simplest way of dealing with the len=0 case would be to still put
> the netconn on your queue, together with some state that will allow the
> other task to know that this connection should be closed, and get the
> other task to delete it.

I thought about that solution, but my application is more complex. There are 
three tasks, each of them communicates with his own serial port. When new data 
come from TCP, I check specific flag, which determines wich task (serial port) 
must get rest of the data frame. So when callback function is called with 
parameter len = 0, I dont know where to put the netconn. I have three threads 
and only one have rights to delete that netconn.

Another question: what if I get (in callback function) parameter len = 0 and 
ignore it? Something like:
void callback_func(....)
{
  if ( len > 0)
  {
    // do what must be done
  }
  else
  {
    // do nothing
  }
}

Could somebody write explanation about that enum values:
NETCONN_EVT_RCVPLUS,
NETCONN_EVT_RCVMINUS,
NETCONN_EVT_SENDPLUS,
NETCONN_EVT_SENDMINUS

Even though I found info on ecos website, I dont understand everything.

Gregory




reply via email to

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