I am writing a SIP code for an IP phone with LwIP and FreeRTOS. Briefly I can not receive the response message after sent out a request message. The code is like that:
/// After created a socket (my_socket) and connected to other end... send (my_socket, message, strlen(message), 0); // Send out a request message recv (my_socket, recv_buffer, sizeof(recv_buffer), 0); // Blocked the thread for receiving a respond debug_flag++; // start microphone and speaker here.../ I use Wireshark to sniff the traffic. My device did send out a request message (an INVITE message in SIP) and the other end did respond a message (a 180 RINGING respond) and my device did reply an ACK for that response. However I found that the "/debug_flag/" did not increment and the thread is still blocked. Then if the other end send out another respond message again (such as a 200 OK respond), the "debug_flag" did increment this time and the thread is unblocked. I have tried to add some delay between the /send()/ and /recv()/, but still can not success. I have also tried to use the netconn_recv(), but the result is similar. Could you help me? Thank you very much. -- View this message in context: http://lwip.100.n7.nabble.com/Can-not-receive-data-by-recv-or-netconn-recv-tp21182.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
