lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] flow of lwip as a stream client


From: trex7
Subject: [lwip-users] flow of lwip as a stream client
Date: Thu, 1 Mar 2012 07:09:08 -0800 (PST)

Hi,
I'm using raw lwip 1.3.2 as a client for an audio stream based application.
I'm a bit confuse how to handle the incomming pbufs when the audio buffer is
full and I have to wait until the audio buffer has enough space to
accomodate the pbuf.
My code looks something like this:

errt_t http_recv_cb(void *arg, struct tcp_pcb, struct pbuf*p, err_t err)
{
     if (connected && buffer_empty)
    {
       temp_pbuf = p;
       do_the_copy_to_buffer_task();//copy pbuf,  free the pbuf and call
tcp_recved()   
       return OK;
     }
     else
     if (connected && !buffer_empty)  // buffer is full. Pbuf cannot be
process
    {
       // what should I do here?
       // should I free the bpuf here? or just ignore the bpuf and do
nothing here.
       // what should I return here?
    }
}

What should I do if the buffer is full and I cant process the incomming
pbufs? Should I call pbuf_free() or should I just ignore the incomming
pbufs? Which value should I return?

Thank you.


-- 
View this message in context: 
http://old.nabble.com/flow-of-lwip-as-a-stream-client-tp33420167p33420167.html
Sent from the lwip-users mailing list archive at Nabble.com.




reply via email to

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