lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Can not receive data by recv() or netconn_recv()


From: garypty
Subject: Re: [lwip-users] Can not receive data by recv() or netconn_recv()
Date: Fri, 1 Mar 2013 07:24:20 -0800 (PST)

I assume when I call the function "send()", a request message is sent out to
other end, this part is okay. Then  when calling the "recv(socket, &buffer,
0)", the thread should be blocked here and wait for a packet arrive. If a
packet arrived, the payload will be copied to the buffer and the thread is
unblocked so the debug_flag will increase one. However when I check with
Wireshark, the request message did sent out and the other end did respond. I
do not understand why the recv() can not receive the first response message
and continue blocking there. When the other end respond a second message
then, the recv() copied the message to the buffer and unblocked the task.

Am I misunderstood the usage of the recv() or other things I have to pay
attention?

The Wireshark traffic is:

A ----INVITE (request msg)----> B  (send() here and calling recv()
immediately)
A <----180 RING (response msg)---- B
A ----ACK ----> B  (The lwip stack send an simple ACK here, but I can not
receive the "180 RING" message)
A <----200 OK---- B
A ----ACK ----> B (The recv() received the "200 OK" here, look like it
skipped/ignored the previous "180 RING")



--
View this message in context: 
http://lwip.100.n7.nabble.com/Can-not-receive-data-by-recv-or-netconn-recv-tp21182p21184.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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