lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] multiple UDP sockets not working in same thread


From: Jeremy Link
Subject: [lwip-users] multiple UDP sockets not working in same thread
Date: Sun, 6 Jul 2014 22:29:16 -0700

Resending this with a different subject (my last posting got hijacked by someone else’s questions).

 

I also found that this only work for me if I have the 2 different sockets created in 2 different threads. This seems like it should be completely unnecessary…

 

Thanks.

 

 

From: address@hidden [mailto:address@hidden On Behalf Of Jeremy Link
Sent: Thursday, July 03, 2014 1:35 PM
To: address@hidden
Subject: problem with multiple UDP sockets

 

I'm running FreeRTOS 8.1 with LwIP 1.3.2.

 

In one of my threads, I create 2 UDP sockets (using netconn) with different port numbers.

 

One of them I connect to INADDR_BROADCAST (multicast transmit) and the other I bind to INADDR_ANY (receive from anyone).

 

Ideally, I would use the same socket, but I found that it did not work.

 

With 2 sockets, only the one that I create first works.

 

If I create my Tx socket first, then my Rx socket will report back an ICMP message that the port is unreachable.

 

If I create my Rx socket first, then I can receive, but my netconn_send() call will block.

 

Any ideas on what could be happening here?

 

Thanks.

 


reply via email to

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