I have a question about "read" (lwip_read) function. I have to connect to a server and I leave the connection permanently open.
When connection is estabilished I send a presentation to server and wait for some data (indefinitely). What I checked is that when I call the function
Code: Select all
r = read(s, recv_buf, sizeof(recv_buf)-1);
I guess that when I call the function if there are no data to read, it should return r=0 and go ahead. Instead I check that it waits for incoming data.
Is it how it should work? I can cope with this behaviour but I have experience with other module (typically GSM/GPRS) where an "interrupt" (event) is called to inform me that some data are ready to be read.
Thank you.